From 8c1171c7f830b83c989c01cfae22683a3e24aa17 Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Thu, 5 Nov 2020 09:45:14 +0000 Subject: [PATCH] Bug 1638977 - Convert 'mach prettier-format' to run with Python 3, r=sylvestre Differential Revision: https://phabricator.services.mozilla.com/D93350 --- mach | 1 - python/mozbuild/mozbuild/code_analysis/mach_commands.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mach b/mach index 71d850a30bde..d47875dc46f9 100755 --- a/mach +++ b/mach @@ -21,7 +21,6 @@ py2commands=" marionette-test jstests mozharness - prettier-format raptor raptor-test telemetry-tests-client diff --git a/python/mozbuild/mozbuild/code_analysis/mach_commands.py b/python/mozbuild/mozbuild/code_analysis/mach_commands.py index bcecac6a1f2d..2ff43be28b61 100644 --- a/python/mozbuild/mozbuild/code_analysis/mach_commands.py +++ b/python/mozbuild/mozbuild/code_analysis/mach_commands.py @@ -2060,7 +2060,7 @@ class StaticAnalysis(MachCommandBase): args = [binary, prettier, "--stdin-filepath", assume_filename] process = subprocess.Popen(args, stdin=subprocess.PIPE) - with open(path, "r") as fin: + with open(path, "rb") as fin: process.stdin.write(fin.read()) process.stdin.close() process.wait()