[2/3] buildtools: fix archive extraction for Python 3.5
Checks
Commit Message
Python 3.5 subprocess.run() has no capture_output parameter.
Use subprocess.PIPE available in all versions.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
To be squashed with caaca1ec6 ("buildtools: support object file
extraction for Windows").
buildtools/gen-pmdinfo-cfile.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -11,7 +11,7 @@
with tempfile.TemporaryDirectory() as temp:
proc = subprocess.run(
# Don't use "ar p", because its output is corrupted on Windows.
- [ar, "xv", os.path.abspath(archive)], capture_output=True, check=True, cwd=temp
+ [ar, "xv", os.path.abspath(archive)], stdout=subprocess.PIPE, check=True, cwd=temp
)
lines = proc.stdout.decode().splitlines()
names = [line[len("x - ") :] for line in lines]