diff --git a/cps/fb2.py b/cps/fb2.py index c68fc380..aa004b10 100644 --- a/cps/fb2.py +++ b/cps/fb2.py @@ -4,8 +4,10 @@ from lxml import etree import os import uploader -import StringIO - +try: + import StringIO +except: + from io import StringIO def get_fb2_info(tmp_file_path, original_file_extension): diff --git a/cps/ub.py b/cps/ub.py index 659106cb..8b52cc1b 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -10,7 +10,7 @@ import os import logging from werkzeug.security import generate_password_hash from flask_babel import gettext as _ -from builtins import str +#from builtins import str dbpath = os.path.join(os.path.normpath(os.path.dirname(os.path.realpath(__file__)) + os.sep + ".." + os.sep), "app.db") engine = create_engine('sqlite:///{0}'.format(dbpath), echo=False) diff --git a/cps/web.py b/cps/web.py index 32698f01..3b3da474 100755 --- a/cps/web.py +++ b/cps/web.py @@ -47,7 +47,7 @@ import db from shutil import move, copyfile from tornado.ioloop import IOLoop from tornado import version as tornadoVersion -from builtins import str +#from builtins import str try: from urllib.parse import quote