mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
contrib: Fix capture_output in getcoins.py
Our required Python version 3.6.12 does not support `capture_output` as
a subprocess.run argument; this was added in python 3.7.
We can emulate it by setting stdout and stderr to subprocess.PIPE
Github-Pull: #26212
Rebased-From: be59bd17ec
This commit is contained in:
parent
7e0bcfbfef
commit
997faf6b6c
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ if args.captcha != '': # Retrieve a captcha
|
||||||
|
|
||||||
# Convert SVG image to PPM, and load it
|
# Convert SVG image to PPM, and load it
|
||||||
try:
|
try:
|
||||||
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, capture_output=True)
|
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
raise SystemExit(f"The binary {args.imagemagick} could not be found. Please make sure ImageMagick (or a compatible fork) is installed and that the correct path is specified.")
|
raise SystemExit(f"The binary {args.imagemagick} could not be found. Please make sure ImageMagick (or a compatible fork) is installed and that the correct path is specified.")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue