[Python-checkins] cpython (2.7): Fixed a bug in previous changeset: StreamReader returned '' instead of u''.

serhiy.storchaka python-checkins at python.org
Sun Jan 26 20:21:03 CET 2014


http://hg.python.org/cpython/rev/450fd2a2447e
changeset:   88732:450fd2a2447e
branch:      2.7
parent:      88727:e24265eb2271
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Jan 26 21:19:59 2014 +0200
summary:
  Fixed a bug in previous changeset: StreamReader returned '' instead of u''.

files:
  Lib/codecs.py |  2 --
  1 files changed, 0 insertions(+), 2 deletions(-)


diff --git a/Lib/codecs.py b/Lib/codecs.py
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -470,8 +470,6 @@
                 newdata = self.stream.read(size)
             # decode bytes (those remaining from the last call included)
             data = self.bytebuffer + newdata
-            if not data:
-                break
             try:
                 newchars, decodedbytes = self.decode(data, self.errors)
             except UnicodeDecodeError, exc:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list