зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1893961 - Remove distutils use from mozbase, , ahal r=Sasha
This has been removed from the stdlib in Python 3.12 Differential Revision: https://phabricator.services.mozilla.com/D208884
This commit is contained in:
Родитель
f60c1e1d15
Коммит
8672146ae5
|
@ -5,9 +5,9 @@ import hashlib
|
|||
import http.client
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import zipfile
|
||||
from distutils import spawn
|
||||
|
||||
import six
|
||||
from mozlog import get_proxy_logger
|
||||
|
@ -95,7 +95,7 @@ class OSXSymbolDumper:
|
|||
|
||||
class LinuxSymbolDumper:
|
||||
def __init__(self):
|
||||
self.nm = spawn.find_executable("nm")
|
||||
self.nm = shutil.which("nm")
|
||||
if not self.nm:
|
||||
raise SymbolError("Could not find nm, necessary for symbol dumping")
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ Unit-Tests for moznetwork
|
|||
"""
|
||||
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
from distutils.spawn import find_executable
|
||||
from unittest import mock
|
||||
|
||||
import mozinfo
|
||||
|
@ -37,7 +37,7 @@ def ip_addresses():
|
|||
|
||||
cmd = None
|
||||
for command in commands:
|
||||
if find_executable(command[0]):
|
||||
if shutil.which(command[0]):
|
||||
cmd = command
|
||||
break
|
||||
else:
|
||||
|
|
|
@ -13,7 +13,6 @@ import subprocess
|
|||
import sys
|
||||
import telnetlib
|
||||
import time
|
||||
from distutils.spawn import find_executable
|
||||
from enum import Enum
|
||||
|
||||
import six
|
||||
|
@ -942,7 +941,7 @@ def _find_sdk_exe(substs, exe, tools):
|
|||
|
||||
if not found:
|
||||
# Is exe on PATH?
|
||||
exe_path = find_executable(exe)
|
||||
exe_path = shutil.which(exe)
|
||||
if exe_path:
|
||||
found = True
|
||||
else:
|
||||
|
|
Загрузка…
Ссылка в новой задаче