Commit 376deebd96c3ce9386f849f5d5f50e957cfc3371
1 parent
6510d668
Exists in
master
Began to actually use new easygui dialogues
Showing
1 changed file
with
2 additions
and
6 deletions
Show diff stats
robots/little_john/telemetry/code/monitor/serialselect.py
... | ... | @@ -29,9 +29,7 @@ def selectserial(): |
29 | 29 | os='Other' #may be useful |
30 | 30 | |
31 | 31 | if len(targetdevs) == 0: |
32 | - print("Sorry, no serial devices found.") | |
33 | - print("Exiting...") | |
34 | - return None | |
32 | + return "Sorry, no serial devices found." | |
35 | 33 | elif len(targetdevs) > 1: |
36 | 34 | print("Found multiple serial devices: ") |
37 | 35 | for i, dev in enumerate(targetdevs): |
... | ... | @@ -68,6 +66,4 @@ def selectserial(): |
68 | 66 | print("Sucessfully opened " + serialport + " as data source!") |
69 | 67 | return datafeed |
70 | 68 | except Exception as e: |
71 | - print("Failed to access " + serialport + " because:") | |
72 | - print(e) | |
73 | - return None | |
69 | + return str(e) | ... | ... |