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

This commit is contained in:
Sebastian Falbesoner committed 2021-08-07 20:50:18 +02:00
1 parent 0eca5ebace
commit 8c203cf0e1
1 file changed
+4
+4
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: