diff roundup/mailer.py @ 5833:3491971eb694

Fix breakage: return address try: > encname = b2s(name.encode('ASCII')) E AttributeError: 'bytes' object has no attribute 'encode' roundup/mailer.py:38: AttributeError reported by CI.
author John Rouillard <rouilj@ieee.org>
date Fri, 05 Jul 2019 20:14:07 -0400
parents bd245858c823
children b3905faf58ea
line wrap: on
line diff
--- a/roundup/mailer.py	Wed Jul 03 22:56:10 2019 -0400
+++ b/roundup/mailer.py	Fri Jul 05 20:14:07 2019 -0400
@@ -35,7 +35,7 @@
     if not name:
         return address
     try:
-        encname = b2s(name.encode('ASCII'))
+        encname = b2s(name).encode('ASCII')
     except UnicodeEncodeError:
         # use Header to encode correctly.
         encname = Header(name, charset=charset).encode()

Roundup Issue Tracker: http://roundup-tracker.org/