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

hpk at codespeak.net hpk at codespeak.net
Sun Jan 2 12:45:55 CET 2005


Author: hpk
Date: Sun Jan  2 12:45:54 2005
New Revision: 8033

Modified:
   py/dist/py/code/frame.py
Log:
revert bogus idea of returning None on a non-existing path.  
It's probably better to just let the exception pass through. 



Modified: py/dist/py/code/frame.py
==============================================================================
--- py/dist/py/code/frame.py	(original)
+++ py/dist/py/code/frame.py	Sun Jan  2 12:45:54 2005
@@ -16,10 +16,7 @@
         try: 
             return fn.__source__ 
         except AttributeError: 
-            try: 
-                return py.code.Source(self.path.read(mode="rU"))
-            except py.path.NotFound: 
-                return None 
+            return py.code.Source(self.path.read(mode="rU"))
     fullsource = property(fullsource, None, None, 
                           "full source containing this code object") 
 



More information about the pytest-commit mailing list