Read about our upcoming Code of Conduct on this issue

Commit bc9f895d authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

dispatch: handle late KeyboardInterrupt occurred in run()

User can press Ctrl+C while flushing streams in dispatch.run(). In such case,
I think exiting with 255 is better than printing Python traceback and exiting
with 1.
parent 9e6b86a8f438
......@@ -140,8 +140,10 @@ def run():
status = -1
_silencestdio()
finally:
pass
except KeyboardInterrupt:
# Catch early/late KeyboardInterrupt as last ditch. Here nothing will
# be printed to console to avoid another IOError/KeyboardInterrupt.
status = -1
sys.exit(status & 255)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment