Bug 1891787 - Remove usage of six in mozbuild/mozconfig.py r=ahochheiden

Differential Revision: https://phabricator.services.mozilla.com/D207607
This commit is contained in:
serge-sans-paille 2024-04-30 13:46:32 +00:00
Родитель f87a5ea054
Коммит b1920088d7
1 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -10,7 +10,6 @@ import traceback
from pathlib import Path
from textwrap import dedent
import six
from mozboot.mozconfig import find_mozconfig
from mozpack import path as mozpath
@ -57,7 +56,7 @@ class MozconfigLoadException(Exception):
{output}
"""
).format(output="\n".join([six.ensure_text(s) for s in self.output]))
).format(output="\n".join(self.output))
Exception.__init__(self, message)
@ -162,16 +161,15 @@ class MozconfigLoader(object):
try:
# We need to capture stderr because that's where the shell sends
# errors if execution fails.
output = six.ensure_text(
subprocess.check_output(
command,
stderr=subprocess.STDOUT,
cwd=self.topsrcdir,
env=env,
universal_newlines=True,
encoding="utf-8",
)
output = subprocess.check_output(
command,
stderr=subprocess.STDOUT,
cwd=self.topsrcdir,
env=env,
universal_newlines=True,
encoding="utf-8",
)
except subprocess.CalledProcessError as e:
lines = e.output.splitlines()