Skip to content

Commit 41e8a2d

Browse files
committed
re-apply traceback patches
1 parent e78ff04 commit 41e8a2d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

graalpython/lib-python/3/traceback.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,18 @@ def format(self, *, chain=True):
566566
"""
567567
if chain:
568568
if self.__cause__ is not None:
569-
yield from self.__cause__.format(chain=chain)
569+
# TODO(ls): revert this loop to "yield from"
570+
for __x in self.__cause__.format(chain=chain): yield __x
570571
yield _cause_message
571572
elif (self.__context__ is not None and
572573
not self.__suppress_context__):
573-
yield from self.__context__.format(chain=chain)
574+
# TODO(ls): revert this loop to "yield from"
575+
for __x in self.__context__.format(chain=chain): yield __x
574576
yield _context_message
575577
if self.exc_traceback is not None:
576578
yield 'Traceback (most recent call last):\n'
577-
yield from self.stack.format()
578-
yield from self.format_exception_only()
579+
# TODO(ls): revert this loop to "yield from"
580+
for __x in self.stack.format(): yield __x
581+
# TODO(ls): revert this loop to "yield from"
582+
for __x in self.format_exception_only(): yield __x
583+

0 commit comments

Comments
 (0)