Skip to content

Commit

Permalink
Merge pull request #26 from neumantm/fix/keyboardInterrupt
Browse files Browse the repository at this point in the history
fix: Catch keyboard interrupt
  • Loading branch information
neumantm authored Sep 23, 2024
2 parents f783dc2 + d4bea68 commit 45fa335
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion prettifyJsonLog/prettifyJsonLog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
from typing import Dict, List, Any, Tuple, Optional

import sys
import os
import json
import fileinput
import shutil
Expand Down Expand Up @@ -93,4 +95,10 @@ def main():


if __name__ == "__main__":
main()
try:
main()
except KeyboardInterrupt:
try:
sys.exit(130)
except SystemExit:
os._exit(130)

0 comments on commit 45fa335

Please sign in to comment.