diff --git a/robots/little_john/telemetry/code/monitor/serialselect.py b/robots/little_john/telemetry/code/monitor/serialselect.py index 01e6b00..9bb2718 100644 --- a/robots/little_john/telemetry/code/monitor/serialselect.py +++ b/robots/little_john/telemetry/code/monitor/serialselect.py @@ -29,9 +29,7 @@ def selectserial(): os='Other' #may be useful if len(targetdevs) == 0: - print("Sorry, no serial devices found.") - print("Exiting...") - return None + return "Sorry, no serial devices found." elif len(targetdevs) > 1: print("Found multiple serial devices: ") for i, dev in enumerate(targetdevs): @@ -68,6 +66,4 @@ def selectserial(): print("Sucessfully opened " + serialport + " as data source!") return datafeed except Exception as e: - print("Failed to access " + serialport + " because:") - print(e) - return None + return str(e) -- libgit2 0.21.2