1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-27 20:10:06 +00:00

Fix Import problem on python2

This commit is contained in:
OzzieIsaacs 2017-03-07 21:08:28 +01:00
parent c725afc3a8
commit a752e62963

View File

@ -14,15 +14,16 @@ import traceback
import re
import unicodedata
try:
from io import StringIO
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
except ImportError as e:
from StringIO import StringIO
from email.MIMEBase import MIMEBase
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
except ImportError as e:
from io import StringIO
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email import encoders
from email.generator import Generator
from email.utils import formatdate