From: Noel Power Date: Tue, 30 Oct 2018 13:22:11 +0000 (+0000) Subject: python/samba/tests: Ensure samba_dnsupdate called with correct python version X-Git-Tag: tdb-1.3.17~764 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5c8ab277b1fa75289ca6a7ee2c87e079b9a6b7d;p=thirdparty%2Fsamba.git python/samba/tests: Ensure samba_dnsupdate called with correct python version We need to examine the contents of PYTHON env variable which should defined the python version to be used when running tests. Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 66067fcf8b9..d79fcfbb997 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -384,8 +384,9 @@ class BlackboxTestCase(TestCaseInTempDir): cmd = parts[0] exe = os.path.join(BINDIR, cmd) if os.path.exists(exe): + python_cmds = ["samba-tool", "samba_dnsupdate"] parts[0] = exe - if cmd =='samba-tool' and os.getenv("PYTHON", None): + if cmd in python_cmds and os.getenv("PYTHON", None): parts.insert(0, os.environ["PYTHON"]) if not isinstance(line, list):