mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
pbuilder-dist: use shutil.which instead of distutils.spawn.find_executable() to save a dependency
LP: #1936697 Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
7f227f6264
commit
4fc36efcf2
@ -29,11 +29,11 @@
|
||||
# configurations. For example, a symlink called pbuilder-hardy will assume
|
||||
# that the target distribution is always meant to be Ubuntu Hardy.
|
||||
|
||||
import distutils.spawn
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
import subprocess
|
||||
import shutil
|
||||
|
||||
import debian.deb822
|
||||
from contextlib import suppress
|
||||
@ -449,7 +449,7 @@ def main():
|
||||
if len(parts) > 2:
|
||||
requested_arch = parts[2]
|
||||
elif len(args) > 0:
|
||||
if distutils.spawn.find_executable('arch-test'):
|
||||
if shutil.which('arch-test') is not None:
|
||||
if subprocess.run(
|
||||
['arch-test', args[0]],
|
||||
stdout=subprocess.DEVNULL).returncode == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user