traceflow
traceflow copied to clipboard
Handle KeyboardInterrupts cleanly
When using traceflow interactively, it's cleaner to gracefully catch KeyboardInterrupts instead of throwing an exception. Ideally it would be less ugly to put the packet sending code in the main loop in a separate method and wrap that in a try..except block.
Hey @cambrant ! Thank you for the PR. I can see the interrupt handled correctly during the initial discovery run:
python3.6 traceflow/__main__.py 1.1.1.1
Resolved 1.1.1.1 to 1.1.1.1
Looking at Path ID 1 (src port:33453 , dst port:33452)
Looking at Path ID 2 (src port:33454 , dst port:33452)
Looking at Path ID 3 (src port:33455 , dst port:33452)
^C
Aborted.
However while serving viz via httpd.serve_forever(), we do not seem to intercept correctly. Can you import sys in printer.py please and re-commit?
Hi, you are right about that. This is fixed and updated now, assuming I understood your remark properly.
Could you please once more rebase on current master? Thank you!