Skip to content

Commit 17d04b9

Browse files
tchalupnikjonathanslenders
authored andcommitted
Reraise GeneratorExit error as excepted exception
1 parent 1a96f0e commit 17d04b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ptpython/printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _format_result_output(
155155
)
156156
yield from formatted_result_repr
157157
return
158-
except KeyboardInterrupt:
158+
except (GeneratorExit, KeyboardInterrupt):
159159
raise # Don't catch here.
160160
except:
161161
# For bad code, `__getattr__` can raise something that's not an

0 commit comments

Comments
 (0)