1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 10:00:37 +00:00

no need future module for python2

fix missing StringIO
This commit is contained in:
林檎 2017-03-05 19:23:49 +08:00
parent bf8688fee1
commit 1da3b57f5a
3 changed files with 6 additions and 4 deletions

View File

@ -4,8 +4,10 @@
from lxml import etree from lxml import etree
import os import os
import uploader import uploader
import StringIO try:
import StringIO
except:
from io import StringIO
def get_fb2_info(tmp_file_path, original_file_extension): def get_fb2_info(tmp_file_path, original_file_extension):

View File

@ -10,7 +10,7 @@ import os
import logging import logging
from werkzeug.security import generate_password_hash from werkzeug.security import generate_password_hash
from flask_babel import gettext as _ 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") 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) engine = create_engine('sqlite:///{0}'.format(dbpath), echo=False)

View File

@ -47,7 +47,7 @@ import db
from shutil import move, copyfile from shutil import move, copyfile
from tornado.ioloop import IOLoop from tornado.ioloop import IOLoop
from tornado import version as tornadoVersion from tornado import version as tornadoVersion
from builtins import str #from builtins import str
try: try:
from urllib.parse import quote from urllib.parse import quote