Skip to content

Commit 4ab0b13

Browse files
committed
[FIX] Suppressed traceback when CTRL+C is pressed
Added a try-catch to suppress the error
1 parent 2ef620e commit 4ab0b13

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

42PyChecker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ def main():
192192

193193
if __name__ == '__main__':
194194
if not platform.system() == "Windows":
195-
print_header()
196-
main()
195+
try:
196+
print_header()
197+
main()
198+
except KeyboardInterrupt:
199+
sys.exit(1)
197200
else:
198201
raise OSError("Sorry, this script can't be run on windows !")

0 commit comments

Comments
 (0)