Skip to content

Commit abf2090

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#26212: contrib: Fix capture_output in getcoins.py
be59bd1 contrib: Fix capture_output in getcoins.py (willcl-ark) Pull request description: Our minimum 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 both stdout and stderr to `subprocess.PIPE` Top commit has no ACKs. Tree-SHA512: 3158bfe657e2d5b263c9337a7ac1dd830e7e119854ec54a40a9e511329fe5bed073350bf70c66b5a6cc9a27dc8eb0e062bbac3969640fd7d6475379726003c98
2 parents 3a230f4 + be59bd1 commit abf2090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/signet/getcoins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def bitcoin_cli(rpc_command_and_params):
129129

130130
# Convert SVG image to PPM, and load it
131131
try:
132-
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, capture_output=True)
132+
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
133133
except FileNotFoundError:
134134
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.")
135135

0 commit comments

Comments
 (0)