Commit 761c7779f3481507599b7d7655217a7c3dc2c968
1 parent
4b97ed18
Exists in
master
Made it possible to quit script while being queried for a serial port selection
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py
| ... | ... | @@ -37,6 +37,8 @@ elif len(targetdevs) > 1: |
| 37 | 37 | selection = int(input("Please enter your selection (as a digit):\n > ")) |
| 38 | 38 | if selection >= 0 and selection < len(targetdevs): |
| 39 | 39 | break |
| 40 | + except KeyboardInterrupt: | |
| 41 | + exit() | |
| 40 | 42 | except: |
| 41 | 43 | print("Choice unrecognised: please try again:") |
| 42 | 44 | else: | ... | ... |