From f93418b7d8a5f9ceed316a9e863ce64d800e809a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 10 Oct 2023 10:57:26 +0200 Subject: [PATCH] cli: skip empty lines when several cmd lines are copy/pasted --- software/script/chameleon_cli_main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/script/chameleon_cli_main.py b/software/script/chameleon_cli_main.py index d90dbdf..5440100 100755 --- a/software/script/chameleon_cli_main.py +++ b/software/script/chameleon_cli_main.py @@ -114,12 +114,12 @@ class ChameleonCLI: cmd_strs = cmd_str.replace( "\r\n", "\n").replace("\r", "\n").split("\n") cmd_str = cmd_strs.pop(0) - if cmd_str == "": - continue except EOFError: cmd_str = 'exit' except KeyboardInterrupt: cmd_str = 'exit' + if cmd_str == '': + continue # look for alternate exit if cmd_str in ["quit", "q", "e"]: