mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
Fix Python Unicode error on macOS CI
This commit is contained in:
parent
f0b970d90d
commit
14f049ddd1
1 changed files with 6 additions and 3 deletions
|
@ -563,9 +563,12 @@ class MachCommands(CommandBase):
|
|||
else:
|
||||
actual_failures.append(failure["output"])
|
||||
|
||||
def format(outputs, description, file=sys.stdout):
|
||||
print(len(outputs), description + ":\n", file=file)
|
||||
file.write('\n'.join(outputs).encode("utf-8"))
|
||||
def format(outputs, description, file=None):
|
||||
formatted = "%s %s:\n%s" % (len(outputs), description, "\n".join(outputs))
|
||||
if file:
|
||||
file.write(formatted.encode("utf-8"))
|
||||
else:
|
||||
print(formatted)
|
||||
|
||||
if log_intermittents:
|
||||
with open(log_intermittents, "wb") as file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue