mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-05-12 11:22:59 -07:00
Fix a bug where a KeyboardInterrupt would trigger an error and crash the app
This commit is contained in:
@@ -106,13 +106,13 @@ class ChameleonCLI:
|
||||
try:
|
||||
cmd_str = self.session.prompt(
|
||||
ANSI(self.get_prompt())).strip()
|
||||
cmd_strs = cmd_str.replace(
|
||||
"\r\n", "\n").replace("\r", "\n").split("\n")
|
||||
cmd_str = cmd_strs.pop(0)
|
||||
except EOFError:
|
||||
closing = True
|
||||
except KeyboardInterrupt:
|
||||
closing = True
|
||||
cmd_strs = cmd_str.replace(
|
||||
"\r\n", "\n").replace("\r", "\n").split("\n")
|
||||
cmd_str = cmd_strs.pop(0)
|
||||
|
||||
if closing or cmd_str in ["exit", "quit", "q", "e"]:
|
||||
print("Bye, thank you. ^.^ ")
|
||||
|
||||
Reference in New Issue
Block a user