contrib: catch bitcoin-cli RPC call errors in getcoins.py

This commit is contained in:
Sebastian Falbesoner 2021-08-07 13:47:57 +02:00
parent 0eca5ebace
commit 8c203cf0e1

View file

@ -31,6 +31,10 @@ def bitcoin_cli(rpc_command_and_params):
except FileNotFoundError:
print('The binary', args.cmd, 'could not be found.')
exit()
except subprocess.CalledProcessError:
cmdline = ' '.join(argv)
print(f'-----\nError while calling "{cmdline}" (see output above).')
exit()
if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET: