commit | daf17e9bc8aa4aae570d9746a724ba5f3fdc7cb9 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Wed May 25 22:52:37 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Wed May 25 22:52:37 2011 +0200 |
tree | 95d10cf2f029b0e2bdccd9bbd8fcf6193c739e6b | |
parent | 5100a405dc6abe7f28597248b3dea415c2089d4a [diff] [blame] |
Issue #12175: RawIOBase.readall() now returns None if read() returns None.
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index dc68d04..76a2d5f 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py
@@ -560,7 +560,11 @@ if not data: break res += data - return bytes(res) + if res: + return bytes(res) + else: + # b'' or None + return data def readinto(self, b): """Read up to len(b) bytes into b.