3
0
Fork 0
forked from mirrors/nixpkgs

nixos/test: Handle undecodable bytes

This threw exceptions in boot menus
This commit is contained in:
Jacek Galowicz 2019-11-06 21:48:53 +01:00 committed by Jacek Galowicz
parent cf138b4e6b
commit 52ee1026b0

View file

@ -597,7 +597,7 @@ class Machine:
def process_serial_output():
for line in self.process.stdout:
line = line.decode().replace("\r", "").rstrip()
line = line.decode("unicode_escape").replace("\r", "").rstrip()
eprint("{} # {}".format(self.name, line))
self.logger.enqueue({"msg": line, "machine": self.name})