diff roundup/anypy/email_.py @ 5090:89c2c1a88927

issue2550850 anypy/email_.py uses BSPACE which is not defined in python 2.7 Supplied a definition for BSPACE since it seems to not be defined anywhere (even searching a python 3.4 install didn't turn up a definition for it). BSPACE definition taken from: http://svn.python.org/projects/python/branches/py3k-urllib/Lib/email/header.py which is almost identical code. Put definition of BSPACE just before the reference to minimize scope and chance of unintended issues. This isn't the best place because it will be redefined every time through, but this is not a heavily used code path or it would have been found/fixed long ago.
author John Rouillard <rouilj@ieee.org>
date Sun, 19 Jun 2016 02:10:56 -0400
parents 28a72f125a14
children 758edaa61ec0
line wrap: on
line diff
--- a/roundup/anypy/email_.py	Sun Jun 19 01:38:22 2016 -0400
+++ b/roundup/anypy/email_.py	Sun Jun 19 02:10:56 2016 -0400
@@ -122,6 +122,7 @@
             last_word = word
             last_charset = charset
         elif last_charset is None:
+            BSPACE = b' '
             last_word += BSPACE + word
         else:
             last_word += word

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