PEP-654: fix bug in leaf_generator example (#1910)
This commit is contained in:
parent
9fadf9cf0a
commit
6d94d73dfc
|
@ -463,7 +463,7 @@ recursively, as follows:
|
|||
tbs = []
|
||||
|
||||
tbs.append(exc.__traceback__)
|
||||
if isinstance(exc, ExceptionGroup):
|
||||
if isinstance(exc, BaseExceptionGroup):
|
||||
for e in exc.exceptions:
|
||||
yield from leaf_generator(e, tbs)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue