summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http/api/api.py5
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