Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent double encoding #25792

Closed
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -24,6 +24,7 @@
import subprocess
from xml.etree.ElementTree import XML
from six import iteritems
import io

from mach.registrar import Registrar
from mach.decorators import (
@@ -560,15 +561,15 @@ def filter_intermittents(self, summary, log_filteredsummary, log_intermittents,

def format(outputs, description, file=sys.stdout):
formatted = "%s %s:\n%s" % (len(outputs), description, "\n".join(outputs))
file.write(formatted.encode("utf-8"))
file.write(formatted)

if log_intermittents:
with open(log_intermittents, "wb") as file:
with io.open(log_intermittents, "w", encoding="utf-8") as file:
format(intermittents, "known-intermittent unexpected results", file)

description = "unexpected results that are NOT known-intermittents"
if log_filteredsummary:
with open(log_filteredsummary, "wb") as file:
with io.open(log_filteredsummary, "w", encoding="utf-8") as file:
format(actual_failures, description, file)

if actual_failures:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.