Skip to content

Commit

Permalink
Reraise GeneratorExit error as excepted exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tchalupnik authored and jonathanslenders committed Feb 6, 2024
1 parent 1a96f0e commit 17d04b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ptpython/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _format_result_output(
)
yield from formatted_result_repr
return
except KeyboardInterrupt:
except (GeneratorExit, KeyboardInterrupt):
raise # Don't catch here.
except:
# For bad code, `__getattr__` can raise something that's not an
Expand Down

0 comments on commit 17d04b9

Please sign in to comment.