Skip to content

Commit a2fe9f4

Browse files
committed
Use trivial write to escape traceback formatter
1 parent f0af27d commit a2fe9f4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/_pyrepl/simple_interact.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ def maybe_run_command(statement: str) -> bool:
171171
console._excepthook(type(exc), exc, tb=None) # type: ignore[attr-defined] # hides traceback
172172
console.resetbuffer()
173173
except MemoryError as exc:
174-
console.write("\n")
175-
console._excepthook(type(exc), exc, tb=None) # type: ignore[attr-defined] # hides traceback
174+
console.write("\nMemoryError\n") # trivial write to use less memory
176175
console.resetbuffer()
177176
except SystemExit:
178177
raise

0 commit comments

Comments
 (0)