Merge pull request #13559 from opensourcerouting/fix/ignore_decoding_chars

tests: Ignore utf-8 decoding errors
This commit is contained in:
Donald Sharp 2023-05-19 21:30:34 -04:00 committed by GitHub
commit cd0956e69d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,7 @@ def spawn(unet, host, cmd, iow, ns_only):
elif master_fd in r:
o = os.read(master_fd, 10240)
if o:
iow.write(o.decode("utf-8"))
iow.write(o.decode("utf-8", "ignore"))
iow.flush()
finally:
# restore tty settings back