Mercurial > hg-stable
changeset 44839:383005aa9cdc stable
run-tests: find python binary on Python 3 (issue6361)
Return strings from _findprogram as all callers expect
unicode strings.
Previously the check in _usecorrectpython agains sysexecutable
was always false on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D8674
author | Axel Hecht <axel@pike.org> |
---|---|
date | Wed, 01 Jul 2020 15:43:15 +0200 |
parents | f58928715d0c |
children | b1a1702262c9 |
files | tests/run-tests.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Jun 29 16:36:53 2020 +0200 +++ b/tests/run-tests.py Wed Jul 01 15:43:15 2020 +0200 @@ -3681,7 +3681,7 @@ for p in osenvironb.get(b'PATH', dpb).split(sepb): name = os.path.join(p, program) if os.name == 'nt' or os.access(name, os.X_OK): - return name + return _bytes2sys(name) return None def _checktools(self): @@ -3692,7 +3692,7 @@ found = self._findprogram(p) p = p.decode("utf-8") if found: - vlog("# Found prerequisite", p, "at", _bytes2sys(found)) + vlog("# Found prerequisite", p, "at", found) else: print("WARNING: Did not find prerequisite tool: %s " % p)