Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r60464:dc81116ff4b7
Date: 2013-01-25 17:38 +0100
http://bitbucket.org/pypy/pypy/changeset/dc81116ff4b7/

Log:    Add a quick hack to prevent py.test from taking forever to display
        certain tracebacks.

diff --git a/py/_code/source.py b/py/_code/source.py
--- a/py/_code/source.py
+++ b/py/_code/source.py
@@ -141,6 +141,8 @@
                 trysource = self[start:end]
                 if trysource.isparseable():
                     return start, end
+                if end == start + 100:   # XXX otherwise, it takes forever
+                    break                # XXX
         if end is None:
             raise IndexError("no valid source range around line %d " % 
(lineno,))
         return start, end
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to