From 3d4d48c2b9514da28dac17a2c92387bfa6239f75 Mon Sep 17 00:00:00 2001 From: "Jakub T. Jankiewicz" Date: Tue, 14 Nov 2023 18:52:08 +0100 Subject: [PATCH] don't show stacktrace from KeyboardInterrupt #3217 --- codespell_lib/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codespell_lib/__main__.py b/codespell_lib/__main__.py index ecc82e092b..0a8630df52 100644 --- a/codespell_lib/__main__.py +++ b/codespell_lib/__main__.py @@ -3,4 +3,7 @@ from ._codespell import _script_main if __name__ == "__main__": - sys.exit(_script_main()) + try: + sys.exit(_script_main()) + except KeyboardInterrupt: + pass