diff options
author | emkael <emkael@tlen.pl> | 2020-10-20 17:05:55 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-10-20 17:05:55 +0200 |
commit | 45dffab74b9423d8495648491681280a51a149ac (patch) | |
tree | 1edaf125ee09d1543dbfd8e4dce4d8a9705b3258 | |
parent | 5da79691092041d7291fc8534d4729938981aa4a (diff) |
StringIO in API imported in a Python3-compatible way
-rw-r--r-- | http/api/api.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/http/api/api.py b/http/api/api.py index f5d48a5..d95cabc 100644 --- a/http/api/api.py +++ b/http/api/api.py @@ -1,7 +1,10 @@ # coding=utf-8 import base64, copy, json, os, random, sys, warnings -from StringIO import StringIO +try: + from StringIO import StringIO # for Python 2 +except ImportError: + from io import StringIO # for Python 3 from mod_python import apache, Session |