Mercurial > hg
changeset 42090:9c07d345fd6d
packaging: don't crash building wix with python3.6 and earlier
`capture_output` was added in 3.7. I was tempted to just check and abort in
build.py, since Windows doesn't have the Linux problem where some distros only
ship an older python. But this is in a library that could be used elsewhere in
the future.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 05 Apr 2019 22:47:45 -0400 |
parents | 16692aa3472b |
children | 57645939df59 |
files | contrib/packaging/hgpackaging/util.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/packaging/hgpackaging/util.py Wed Apr 03 23:55:03 2019 -0400 +++ b/contrib/packaging/hgpackaging/util.py Fri Apr 05 22:47:45 2019 -0400 @@ -142,11 +142,9 @@ def python_exe_info(python_exe: pathlib.Path): """Obtain information about a Python executable.""" - res = subprocess.run( - [str(python_exe), '-c', PRINT_PYTHON_INFO], - capture_output=True, check=True) + res = subprocess.check_output([str(python_exe), '-c', PRINT_PYTHON_INFO]) - arch, version = res.stdout.decode('utf-8').split(':') + arch, version = res.decode('utf-8').split(':') version = distutils.version.LooseVersion(version)