Mercurial > p > roundup > code
diff roundup/mailer.py @ 5248:198b6e810c67
Use Python-3-compatible 'as' syntax for except statements
Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
| author | Eric S. Raymond <esr@thyrsus.com> |
|---|---|
| date | Thu, 24 Aug 2017 22:21:37 -0400 |
| parents | 092c4522b3bf |
| children | 17edccfe1755 |
line wrap: on
line diff
--- a/roundup/mailer.py Thu Aug 24 17:55:02 2017 -0400 +++ b/roundup/mailer.py Thu Aug 24 22:21:37 2017 -0400 @@ -189,7 +189,7 @@ body.append(header) try: bounced_message.rewindbody() - except IOError, errmessage: + except IOError as errmessage: body.append("*** couldn't include message body: %s ***" % errmessage) else: @@ -292,7 +292,7 @@ # instead of to roundup smtp = SMTPConnection(self.config) smtp.sendmail(sender, to, message) - except socket.error, value: + except socket.error as value: raise MessageSendError("Error: couldn't send email: " "mailhost %s"%value) except smtplib.SMTPException, msg:
