From 7282839cf73860de6d4dd3063bc8346c65343a9b Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 5 Dec 2019 15:42:38 +0100 Subject: [PATCH] Fix Python Unicode error in './mach filter-intermittents' Fix https://github.com/servo/servo/issues/25062 --- python/servo/testing_commands.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 01cdc14db30..f44bfd46f53 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -563,12 +563,9 @@ class MachCommands(CommandBase): else: actual_failures.append(failure["output"]) - def format(outputs, description, file=None): + def format(outputs, description, file=sys.stdout): formatted = "%s %s:\n%s" % (len(outputs), description, "\n".join(outputs)) - if file: - file.write(formatted.encode("utf-8")) - else: - print(formatted) + file.write(formatted.encode("utf-8")) if log_intermittents: with open(log_intermittents, "wb") as file: