Fix Import problem on python2

pull/142/merge
OzzieIsaacs 8 years ago
parent c725afc3a8
commit a752e62963

@ -14,15 +14,16 @@ import traceback
import re import re
import unicodedata import unicodedata
try: 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 StringIO import StringIO
from email.MIMEBase import MIMEBase from email.MIMEBase import MIMEBase
from email.MIMEMultipart import MIMEMultipart from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText 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 import encoders
from email.generator import Generator from email.generator import Generator
from email.utils import formatdate from email.utils import formatdate

Loading…
Cancel
Save