mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 03:37:46 +00:00
[thci] drop empty lines returned in command outout from the response (#7236)
In some cases the first element from the output from __executeCommand
might be empty line, which casues command failures like on below
trace:
__executeCommand('extaddr',) returns ['', '166e0a0000000001', '', 'Done']
FUNC getMAC failed: invalid literal for int() with base 16: ''
This commit filters out empty string from the result of
__executeCommand.
This commit is contained in:
@@ -298,7 +298,9 @@ class OpenThreadTHCI(object):
|
||||
continue
|
||||
|
||||
self.log("readline: %s", line)
|
||||
response.append(line)
|
||||
# skip empty lines
|
||||
if line:
|
||||
response.append(line)
|
||||
|
||||
if line.endswith('Done'):
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user