mirror of
https://github.com/espressif/openthread.git
synced 2026-09-12 04:00:10 +00:00
[cli] disallow concurrent commands (#6695)
This commit disallows concurrent commands. With this commit, the CLI only execute a new command after it complete the previous command. CLI can also prompt properly after the command execution is done. Other fixes and enhancements: - Fixes premature command prompt - Add ping async command for ping in async mode: output Done immediately but print ping responses later on. - Fixes networkdiagnostic get outputs multiple Done by always waiting for 5 seconds.
This commit is contained in:
@@ -180,6 +180,8 @@ class OtCliCommandRunner(OTCommandHandler):
|
||||
def __otcli_read_routine(self):
|
||||
while not self.__should_close.isSet():
|
||||
line = self.__otcli.readline()
|
||||
logging.debug('%s: %r', self.__otcli, line)
|
||||
|
||||
if line.startswith('> '):
|
||||
line = line[2:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user