Bug 1547730 - do s/StringIO.StringIO/six.StringIO/ to support py3 r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D28101

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Justin Wood 2019-05-28 14:25:00 +00:00
Родитель a320da451c
Коммит 7702de90f5
2 изменённых файлов: 3 добавлений и 4 удалений

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

@ -19,7 +19,6 @@ except ImportError:
# shutil.which is not available in Python 2.7 # shutil.which is not available in Python 2.7
import which import which
from StringIO import StringIO
from mach.mixin.process import ProcessExecutionMixin from mach.mixin.process import ProcessExecutionMixin
from mozversioncontrol import ( from mozversioncontrol import (
get_repository_from_build_config, get_repository_from_build_config,
@ -273,7 +272,7 @@ class MozbuildObject(ProcessExecutionMixin):
# the environment variable, which has an impact on autodetection (when # the environment variable, which has an impact on autodetection (when
# path is MozconfigLoader.AUTODETECT), and memoization wouldn't account # path is MozconfigLoader.AUTODETECT), and memoization wouldn't account
# for it without the explicit (unused) argument. # for it without the explicit (unused) argument.
out = StringIO() out = six.StringIO()
env = os.environ env = os.environ
if path and path != MozconfigLoader.AUTODETECT: if path and path != MozconfigLoader.AUTODETECT:
env = dict(env) env = dict(env)

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

@ -60,12 +60,12 @@ import mozfile
import mozunit import mozunit
import os import os
import random import random
import six
import sys import sys
import tarfile import tarfile
import mozpack.path as mozpath import mozpack.path as mozpath
from tempfile import mkdtemp from tempfile import mkdtemp
from io import BytesIO from io import BytesIO
from StringIO import StringIO
class TestWithTmpDir(unittest.TestCase): class TestWithTmpDir(unittest.TestCase):
@ -921,7 +921,7 @@ class TestMinifiedJavaScript(TestWithTmpDir):
def test_minified_verify_failure(self): def test_minified_verify_failure(self):
orig_f = GeneratedFile(b'\n'.join(self.orig_lines)) orig_f = GeneratedFile(b'\n'.join(self.orig_lines))
errors.out = StringIO() errors.out = six.StringIO()
min_f = MinifiedJavaScript(orig_f, min_f = MinifiedJavaScript(orig_f,
verify_command=self._verify_command('1')) verify_command=self._verify_command('1'))