test-runner: allow decode failure when writing IO

If this fails, e.g. an invalid utf-8 character it should not cause
the test to fail.
This commit is contained in:
James Prestwood 2022-04-06 12:14:53 -07:00 committed by Denis Kenzior
parent 9edb196395
commit cec5fab9b3
1 changed files with 4 additions and 1 deletions

View File

@ -168,7 +168,10 @@ class Process(subprocess.Popen):
if not data:
return True
data = data.decode('utf-8')
try:
data = data.decode('utf-8')
except:
return True
# Save data away in case the caller needs it (e.g. list_sta)
self.out += data