[pypy-commit] pypy py3.5: (pjenvey) fix SyntaxError.wrap_info()

rlamy pypy.commits at gmail.com
Thu Nov 16 20:52:10 EST 2017


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r93065:cce3bc563868
Date: 2017-11-17 01:51 +0000
http://bitbucket.org/pypy/pypy/changeset/cce3bc563868/

Log:	(pjenvey) fix SyntaxError.wrap_info()

diff --git a/pypy/interpreter/pyparser/error.py b/pypy/interpreter/pyparser/error.py
--- a/pypy/interpreter/pyparser/error.py
+++ b/pypy/interpreter/pyparser/error.py
@@ -23,8 +23,8 @@
                     try:
                         with open(filename) as f:
                             for _ in range(lineno):
-                                f.read()
-                            return f.read()
+                                f.readline()
+                            return f.readline()
                     except:  # we can't allow any exceptions here!
                         return None""")
         elif self.text is not None:


More information about the pypy-commit mailing list