commit | 9fa094677186b4bb05e488e5bc9d5dfe7ec32812 | [log] [tgz] |
---|---|---|
author | Walter Dörwald <walter@livinglogic.de> | Mon Jan 10 12:01:39 2005 +0000 |
committer | Walter Dörwald <walter@livinglogic.de> | Mon Jan 10 12:01:39 2005 +0000 |
tree | d12868a66f07665fa198640df412ccbcef102fb2 | |
parent | c0b194a77082f2db4b5689a27e73f07fa046fa79 [diff] [blame] |
Fix and test for SF bug #1098990: codec readline() splits lines apart.
diff --git a/Lib/codecs.py b/Lib/codecs.py index f6d480c..b283925 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py
@@ -322,9 +322,9 @@ line = line0withend else: line = line0withoutend - break + break # we didn't get anything or this was our only try - elif not data or size is not None: + if not data or size is not None: if line and not keepends: line = line.splitlines(False)[0] break