[py-svn] r64002 - py/dist/py/code

fijal at codespeak.net fijal at codespeak.net
Mon Apr 13 01:20:26 CEST 2009


Author: fijal
Date: Mon Apr 13 01:20:26 2009
New Revision: 64002

Modified:
   py/dist/py/code/frame.py
Log:
if code.fullsource is None (which can happen), expr is also empty


Modified: py/dist/py/code/frame.py
==============================================================================
--- py/dist/py/code/frame.py	(original)
+++ py/dist/py/code/frame.py	Mon Apr 13 01:20:26 2009
@@ -13,6 +13,8 @@
         self.raw = frame
 
     def statement(self):
+        if self.code.fullsource is None:
+            return py.code.Source("")
         return self.code.fullsource.getstatement(self.lineno)
     statement = property(statement, None, None,
                          "statement this frame is at")



More information about the pytest-commit mailing list