Skip to content

Commit 8c203cf

Browse files
committed
contrib: catch bitcoin-cli RPC call errors in getcoins.py
1 parent 0eca5eb commit 8c203cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/signet/getcoins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def bitcoin_cli(rpc_command_and_params):
3131
except FileNotFoundError:
3232
print('The binary', args.cmd, 'could not be found.')
3333
exit()
34+
except subprocess.CalledProcessError:
35+
cmdline = ' '.join(argv)
36+
print(f'-----\nError while calling "{cmdline}" (see output above).')
37+
exit()
3438

3539

3640
if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET:

0 commit comments

Comments
 (0)