Ctrl + c disconnect pico now...

This commit is contained in:
Gino D
2023-01-06 21:41:53 +01:00
parent bbc9bcf34f
commit ccd71a6080

View File

@@ -848,9 +848,10 @@ while True:
unmessage = input('>>> ').strip() unmessage = input('>>> ').strip()
for message in unmessage.split('&'): for message in unmessage.split('&'):
try:
match message.strip().split(' '): match message.strip().split(' '):
case ['exit' | '\x18']: case ['exit']:
sys.exit() sys.exit('Picowatch Terminal disconnected!')
case ['help']: case ['help']:
print('TODO') print('TODO')
case ['whois']: case ['whois']:
@@ -890,3 +891,5 @@ while True:
print(f'"{message}" is not recognized.') print(f'"{message}" is not recognized.')
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
except (KeyboardInterrupt, EOFError):
sys.exit('Picowatch Terminal disconnected!')