From 52ee1026b01bd875ca5a95f9fe1193dcbd742364 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Wed, 6 Nov 2019 21:48:53 +0100 Subject: [PATCH] nixos/test: Handle undecodable bytes This threw exceptions in boot menus --- nixos/lib/test-driver/test-driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 28065cd60a90..c83d1f4ba1ce 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -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})