Author: Ronan Lamy <ronan.l...@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):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to