From 1a1081ea6fe020ac15600032c037523f7743159f Mon Sep 17 00:00:00 2001 From: androiddrew Date: Fri, 19 Jan 2018 16:36:40 -0500 Subject: [PATCH] fixed bare exception --- apistar_mail/mail.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apistar_mail/mail.py b/apistar_mail/mail.py index 9bd43cd..6acc5cd 100644 --- a/apistar_mail/mail.py +++ b/apistar_mail/mail.py @@ -43,7 +43,7 @@ def force_text(s, encoding='utf-8', errors='strict', ): raise MailUnicodeDecodeError(s, *e.args) else: s = ' '.join([force_text(arg, encoding, errors) for arg in s]) - except: + except UnicodeDecodeError as e: raise MailUnicodeDecodeError(s, *e.args) return s @@ -112,9 +112,6 @@ def _has_newline(line): return False - - - class Attachment: """Encapsulates file attachment information.