From 761c7779f3481507599b7d7655217a7c3dc2c968 Mon Sep 17 00:00:00 2001 From: Christopher Stone Date: Wed, 7 Mar 2018 17:53:23 +0000 Subject: [PATCH] Made it possible to quit script while being queried for a serial port selection --- robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py b/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py index b627637..77d519e 100755 --- a/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py +++ b/robots/little_john/telemetry/code/monitor/graph_plotter_rewrite.py @@ -37,6 +37,8 @@ elif len(targetdevs) > 1: selection = int(input("Please enter your selection (as a digit):\n > ")) if selection >= 0 and selection < len(targetdevs): break + except KeyboardInterrupt: + exit() except: print("Choice unrecognised: please try again:") else: -- libgit2 0.21.2