[Python-Dev] [Python-checkins] r88197 - python/branches/py3k/Lib/email/generator.py (original) (raw)

Brett Cannon brett at python.org
Wed Jan 26 03:07:38 CET 2011


This broke the buildbots (R. David Murray thinks you may have forgotten to call super() in the 'payload is None' branch). Are you getting code reviews and fully running the test suite before committing? We are in RC.

On Tue, Jan 25, 2011 at 16:39, victor.stinner <python-checkins at python.org> wrote:

Author: victor.stinner Date: Wed Jan 26 01:39:19 2011 New Revision: 88197

Log: Fix BytesGenerator.handletext() if the message has no payload (None) Modified: python/branches/py3k/Lib/email/generator.py Modified: python/branches/py3k/Lib/email/generator.py ============================================================================== --- python/branches/py3k/Lib/email/generator.py (original) +++ python/branches/py3k/Lib/email/generator.py Wed Jan 26 01:39:19 2011 @@ -377,8 +377,11 @@ def handletext(self, msg): # If the string has surrogates the original source was bytes, so # just write it back out. -        if hassurrogates(msg.payload): -            self.write(msg.payload) +        payload = msg.getpayload() +        if payload is None: +            return +        if hassurrogates(payload): +            self.write(payload) else: super(BytesGenerator,self).handletext(msg)


Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins



More information about the Python-Dev mailing list