Browse Source

Exit cleanly on keyboard interrupt

master
Jim Paris 2 months ago
parent
commit
ed0f7f47f9
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      itm-decode.py

+ 5
- 1
itm-decode.py View File

@@ -162,7 +162,11 @@ def main(argv):
yield None
else:
yield data[0]
ITMParser(input_stream()).process()

try:
ITMParser(input_stream()).process()
except KeyboardInterrupt:
raise SystemExit(0)

if __name__ == "__main__":
main(sys.argv)

Loading…
Cancel
Save