[pypy-svn] r63743 - pypy/trunk/pypy/tool/pytest

fijal at codespeak.net fijal at codespeak.net
Mon Apr 6 22:39:55 CEST 2009


Author: fijal
Date: Mon Apr  6 22:39:53 2009
New Revision: 63743

Modified:
   pypy/trunk/pypy/tool/pytest/appsupport.py
Log:
don't blow up when text can't be read


Modified: pypy/trunk/pypy/tool/pytest/appsupport.py
==============================================================================
--- pypy/trunk/pypy/tool/pytest/appsupport.py	(original)
+++ pypy/trunk/pypy/tool/pytest/appsupport.py	Mon Apr  6 22:39:53 2009
@@ -26,7 +26,10 @@
         try:
             return self.space.str_w(self.w_file).__source__
         except AttributeError:
-            return py.code.Source(self.path.read(mode="rU"))
+            try:
+                return py.code.Source(self.path.read(mode="rU"))
+            except py.error.Error:
+                return "????"
     fullsource = property(fullsource, None, None, "Full source of AppCode")
 
     def getargs(self):



More information about the Pypy-commit mailing list