Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 99a0d7e

Browse filesBrowse files
gh-131878: Handle top level exceptions in new pyrepl and prevent of closing it (#131910)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 1bc1650 commit 99a0d7e
Copy full SHA for 99a0d7e

File tree

Expand file treeCollapse file tree

2 files changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-0
lines changed

‎Lib/_pyrepl/simple_interact.py

Copy file name to clipboardExpand all lines: Lib/_pyrepl/simple_interact.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,8 @@ def maybe_run_command(statement: str) -> bool:
162162
except MemoryError:
163163
console.write("\nMemoryError\n")
164164
console.resetbuffer()
165+
except SystemExit:
166+
raise
167+
except:
168+
console.showtraceback()
169+
console.resetbuffer()
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Handle uncaught exceptions in the main input loop for the new REPL.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.