forked from mirrors/gecko-dev
Bug 1942259 - Replace pipes imports a=dmeehan
pipes does not exist in Python 3.11 any more Original Revision: https://phabricator.services.mozilla.com/D227964 Differential Revision: https://phabricator.services.mozilla.com/D236165
This commit is contained in:
parent
a03dc5f488
commit
b6a806fdf1
4 changed files with 5 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import json
|
||||
import pipes
|
||||
import re
|
||||
import shlex
|
||||
|
||||
from .progressbar import NullProgressBar, ProgressBar
|
||||
from .structuredlog import TestLogger
|
||||
|
|
@ -9,7 +9,7 @@ from .structuredlog import TestLogger
|
|||
|
||||
|
||||
def escape_cmdline(args):
|
||||
return " ".join([pipes.quote(a) for a in args])
|
||||
return " ".join([shlex.quote(a) for a in args])
|
||||
|
||||
|
||||
class TestOutput:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
import io
|
||||
import os
|
||||
import pipes
|
||||
import posixpath
|
||||
import re
|
||||
import shlex
|
||||
|
|
@ -1292,8 +1291,6 @@ class ADBDevice(ADBCommand):
|
|||
"""Utility function to return quoted version of command argument."""
|
||||
if hasattr(shlex, "quote"):
|
||||
quote = shlex.quote
|
||||
elif hasattr(pipes, "quote"):
|
||||
quote = pipes.quote
|
||||
else:
|
||||
|
||||
def quote(arg):
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ filterwarnings =
|
|||
ignore:This method will be removed in .*\.\s+Use 'parser\.read_file\(\)' instead\.:DeprecationWarning:mozversion
|
||||
# ignore mozversion not cleanly closing .ini files
|
||||
ignore:unclosed file.*\.ini:ResourceWarning:mozversion
|
||||
# mozdevice uses pipes module
|
||||
ignore:'pipes' is deprecated and slated for removal in Python 3:DeprecationWarning
|
||||
# mozrunner uses telnetlib module
|
||||
ignore:'telnetlib' is deprecated and slated for removal in Python 3:DeprecationWarning
|
||||
# https://github.com/web-platform-tests/wpt/issues/39366
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
import copy
|
||||
import json
|
||||
import os
|
||||
import pipes
|
||||
import platform
|
||||
import random
|
||||
import re
|
||||
import shlex
|
||||
import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
|
|
@ -372,11 +372,11 @@ class XPCShellTestThread(Thread):
|
|||
)
|
||||
self.log.info("%s | environment: %s" % (name, list(changedEnv)))
|
||||
shell_command_tokens = [
|
||||
pipes.quote(tok) for tok in list(changedEnv) + completeCmd
|
||||
shlex.quote(tok) for tok in list(changedEnv) + completeCmd
|
||||
]
|
||||
self.log.info(
|
||||
"%s | as shell command: (cd %s; %s)"
|
||||
% (name, pipes.quote(testdir), " ".join(shell_command_tokens))
|
||||
% (name, shlex.quote(testdir), " ".join(shell_command_tokens))
|
||||
)
|
||||
|
||||
def killTimeout(self, proc):
|
||||
|
|
|
|||
Loading…
Reference in a new issue