mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-04 04:02:23 +02:00
contrib: catch bitcoin-cli RPC call errors in getcoins.py
This commit is contained in:
parent
0eca5ebace
commit
8c203cf0e1
@ -31,6 +31,10 @@ def bitcoin_cli(rpc_command_and_params):
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print('The binary', args.cmd, 'could not be found.')
|
print('The binary', args.cmd, 'could not be found.')
|
||||||
exit()
|
exit()
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
cmdline = ' '.join(argv)
|
||||||
|
print(f'-----\nError while calling "{cmdline}" (see output above).')
|
||||||
|
exit()
|
||||||
|
|
||||||
|
|
||||||
if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET:
|
if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user