fixed bare exception

master
androiddrew 7 years ago
parent 4b3d08137e
commit 1a1081ea6f

@ -43,7 +43,7 @@ def force_text(s, encoding='utf-8', errors='strict', ):
raise MailUnicodeDecodeError(s, *e.args) raise MailUnicodeDecodeError(s, *e.args)
else: else:
s = ' '.join([force_text(arg, encoding, errors) for arg in s]) s = ' '.join([force_text(arg, encoding, errors) for arg in s])
except: except UnicodeDecodeError as e:
raise MailUnicodeDecodeError(s, *e.args) raise MailUnicodeDecodeError(s, *e.args)
return s return s
@ -112,9 +112,6 @@ def _has_newline(line):
return False return False
class Attachment: class Attachment:
"""Encapsulates file attachment information. """Encapsulates file attachment information.

Loading…
Cancel
Save