Commit 761c7779f3481507599b7d7655217a7c3dc2c968

Authored by Christopher Stone
1 parent 4b97ed18
Exists in master

Made it possible to quit script while being queried for a serial port selection

robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py
@@ -37,6 +37,8 @@ elif len(targetdevs) > 1: @@ -37,6 +37,8 @@ elif len(targetdevs) > 1:
37 selection = int(input("Please enter your selection (as a digit):\n > ")) 37 selection = int(input("Please enter your selection (as a digit):\n > "))
38 if selection >= 0 and selection < len(targetdevs): 38 if selection >= 0 and selection < len(targetdevs):
39 break 39 break
  40 + except KeyboardInterrupt:
  41 + exit()
40 except: 42 except:
41 print("Choice unrecognised: please try again:") 43 print("Choice unrecognised: please try again:")
42 else: 44 else: