[svn r58888] Catch all possible find_source errors

--HG--
branch : trunk
This commit is contained in:
fijal 2008-10-10 11:59:31 +02:00
parent 8650c801a2
commit 4e3d14162d
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ class TracebackEntry(object):
if source is None:
try:
sourcelines, lineno = py.std.inspect.findsource(self.frame.code.raw)
except IOError:
except (KeyboardInterrupt, SystemExit):
raise
except:
return None
source = py.code.Source()
source.lines = map(str.rstrip, sourcelines)