aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2019-12-05 15:42:38 +0100
committerSimon Sapin <simon.sapin@exyr.org>2019-12-05 15:48:39 +0100
commit7282839cf73860de6d4dd3063bc8346c65343a9b (patch)
treeb1b82dab84b0b54098439e0c9f559552cc58dbb7 /python
parent5cc68f507599f56beeb6623df6871504b95b3458 (diff)
downloadservo-7282839cf73860de6d4dd3063bc8346c65343a9b.tar.gz
servo-7282839cf73860de6d4dd3063bc8346c65343a9b.zip
Fix Python Unicode error in './mach filter-intermittents'
Fix https://github.com/servo/servo/issues/25062
Diffstat (limited to 'python')
-rw-r--r--python/servo/testing_commands.py7
1 files 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: