Skip to content

Commit 1720189

Browse files
Don't print exception twice in exception handler.
The exception formatting itself already prints the exception message. Printing the exception again leads to lots of duplicated output if the exception contains a long multiline message.
1 parent af89ce2 commit 1720189

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ptpython/repl.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,6 @@ def _handle_exception(self, e: BaseException) -> None:
573573
include_default_pygments_style=False,
574574
output=output,
575575
)
576-
577-
output.write("%s\n" % e)
578576
output.flush()
579577

580578
def _handle_keyboard_interrupt(self, e: KeyboardInterrupt) -> None:

0 commit comments

Comments
 (0)