[svn r51292] Just another except, in order to represent source when it's not there.
--HG-- branch : trunk
This commit is contained in:
parent
ba91810a17
commit
37d357ff4c
|
@ -71,8 +71,11 @@ class Presenter(object):
|
|||
s = str(source.getstatement(len(source)-1))
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except:
|
||||
s = str(source[-1])
|
||||
except:
|
||||
try:
|
||||
s = str(source[-1])
|
||||
except IndexError:
|
||||
s = "<Cannot get source>"
|
||||
indent = " " * (4 + (len(s) - len(s.lstrip())))
|
||||
# get the real exception information out
|
||||
lines = excinfo.exconly(tryshort=True).split('\n')
|
||||
|
|
Loading…
Reference in New Issue