mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1586010 - [mozversioncontrol] Ensure env in appropriate format for subprocess, r=chmanchester
Environment should be bytes on Python 2 (to avoid Windows errors) and text on Python 3. The 'ensure_subprocess' env utility function handles this. Differential Revision: https://phabricator.services.mozilla.com/D48115 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c70b0f040f
commit
9067e54ba4
@ -11,6 +11,8 @@ import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from mozbuild.util import ensure_subprocess_env
|
||||
|
||||
from distutils.spawn import find_executable
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
@ -99,7 +101,7 @@ class Repository(object):
|
||||
try:
|
||||
return subprocess.check_output(cmd,
|
||||
cwd=self.path,
|
||||
env=self._env,
|
||||
env=ensure_subprocess_env(self._env),
|
||||
universal_newlines=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
if e.returncode in return_codes:
|
||||
|
Loading…
Reference in New Issue
Block a user