Refs #31672 -- Simplified ExceptionReporter.get_traceback_frames().
This commit is contained in:
parent
9159d173c3
commit
a492ccf0bc
|
@ -427,12 +427,13 @@ class ExceptionReporter:
|
||||||
# In case there's just one exception, take the traceback from self.tb
|
# In case there's just one exception, take the traceback from self.tb
|
||||||
exc_value = exceptions.pop()
|
exc_value = exceptions.pop()
|
||||||
tb = self.tb if not exceptions else exc_value.__traceback__
|
tb = self.tb if not exceptions else exc_value.__traceback__
|
||||||
frames.extend(self.get_exception_traceback_frames(exc_value, tb))
|
while True:
|
||||||
while exceptions:
|
frames.extend(self.get_exception_traceback_frames(exc_value, tb))
|
||||||
exc_value = exceptions.pop()
|
try:
|
||||||
frames.extend(
|
exc_value = exceptions.pop()
|
||||||
self.get_exception_traceback_frames(exc_value, exc_value.__traceback__),
|
except IndexError:
|
||||||
)
|
break
|
||||||
|
tb = exc_value.__traceback__
|
||||||
return frames
|
return frames
|
||||||
|
|
||||||
def get_exception_traceback_frames(self, exc_value, tb):
|
def get_exception_traceback_frames(self, exc_value, tb):
|
||||||
|
|
Loading…
Reference in New Issue