[pypy-commit] pypy py3.5: Blind change, trying to fix test.test_memoryio.CStringIOTest failures
rlamy
pypy.commits at gmail.com
Sun Dec 3 13:18:34 EST 2017
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r93255:82c3b0528d78
Date: 2017-12-03 18:17 +0000
http://bitbucket.org/pypy/pypy/changeset/82c3b0528d78/
Log: Blind change, trying to fix test.test_memoryio.CStringIOTest
failures
diff --git a/pypy/module/_io/interp_stringio.py b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -43,6 +43,8 @@
# Universal newline search. Find any of \r, \r\n, \n
limit = self._convert_limit(limit)
start = self.pos
+ if start >= len(self.data):
+ return u''
end = start + limit
pos = start
while pos < end:
@@ -65,6 +67,8 @@
def readline(self, marker, limit):
start = self.pos
limit = self._convert_limit(limit)
+ if start >= len(self.data):
+ return u''
end = start + limit
found = False
for pos in range(start, end - len(marker) + 1):
More information about the pypy-commit
mailing list