From c609974f04aba2786d65c75d436cee051541cd65 Mon Sep 17 00:00:00 2001 From: fijal Date: Tue, 11 Nov 2008 20:11:14 +0100 Subject: [PATCH] [svn r59871] yet-another-except when trying to get source --HG-- branch : trunk --- py/code/excinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/code/excinfo.py b/py/code/excinfo.py index e0ce0fe5f..4f73b092c 100644 --- a/py/code/excinfo.py +++ b/py/code/excinfo.py @@ -91,7 +91,10 @@ class FormattedExcinfo(object): except KeyboardInterrupt: raise except: - s = str(source[-1]) + try: + s = str(source[-1]) + except: + return 0 return 4 + (len(s) - len(s.lstrip())) def _getentrysource(self, entry):