nixosTests: Drop invalid utf characters in command output

This commit is contained in:
Jacek Galowicz 2020-01-26 13:04:11 +01:00
parent 3c5add99f6
commit f63ef280df

View file

@ -395,7 +395,7 @@ class Machine:
status_code_pattern = re.compile(r"(.*)\|\!EOF\s+(\d+)")
while True:
chunk = self.shell.recv(4096).decode()
chunk = self.shell.recv(4096).decode(errors="ignore")
match = status_code_pattern.match(chunk)
if match:
output += match[1]