diff options
| author | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2021-11-11 12:06:09 +0000 |
|---|---|---|
| committer | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2021-11-11 12:07:14 +0000 |
| commit | 7e24af04d8fee5bd50bb469d294cf0c27520c34b (patch) | |
| tree | 794107c23f9ed96e1ffea3355c2246ee8c79c44b /debian/tests | |
| parent | f51fb6757558155514b7408b00f91ce329afb328 (diff) | |
debian/tests: drop which usage to fix adt failure in jammy
Command which is obsolete, and prints warnings to stderr now. Replace it with python standard library call to shutil.which(). Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Diffstat (limited to 'debian/tests')
| -rw-r--r-- | debian/tests/network_test_base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debian/tests/network_test_base.py b/debian/tests/network_test_base.py index 2adbbd4b..221aad15 100644 --- a/debian/tests/network_test_base.py +++ b/debian/tests/network_test_base.py @@ -15,6 +15,7 @@ import os import os.path import time import tempfile +import shutil import subprocess import re import unittest @@ -25,7 +26,7 @@ from glob import glob # check availability of programs, and cleanly skip test if they are not # available for program in ["wpa_supplicant", "hostapd", "dnsmasq", "dhclient"]: - if subprocess.call(["which", program], stdout=subprocess.PIPE) != 0: + if shutil.which(program) is None: sys.stderr.write( "%s is required for this test suite, but not available. Skipping\n" % program |