[svn r58775] only check for Recursion if we have a RuntimeError

--HG--
branch : trunk
This commit is contained in:
hpk 2008-10-07 17:44:56 +02:00
parent c338420976
commit 8650c801a2
2 changed files with 5 additions and 1 deletions

View File

@ -194,7 +194,9 @@ class FormattedExcinfo(object):
traceback = excinfo.traceback traceback = excinfo.traceback
if self.tbfilter: if self.tbfilter:
traceback = traceback.filter() traceback = traceback.filter()
recursionindex = traceback.recursionindex() recursionindex = None
if excinfo.errisinstance(RuntimeError):
recursionindex = traceback.recursionindex()
last = traceback[-1] last = traceback[-1]
entries = [] entries = []
extraline = None extraline = None

View File

@ -351,6 +351,8 @@ raise ValueError()
def exconly(self, tryshort): def exconly(self, tryshort):
return "EXC" return "EXC"
def errisinstance(self, cls):
return False
excinfo = FakeExcinfo() excinfo = FakeExcinfo()
class FakeRawTB(object): class FakeRawTB(object):