diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-07 20:48:15 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-07 20:50:19 +0200 |
commit | 42dbd9025adc200012c103d2c091cf026f1d50b1 (patch) | |
tree | 0de840da4f896c250f542508feca1f2289f59206 /contrib/signet | |
parent | 8c203cf0e1b9558b54030c284ddf7706d64cdde2 (diff) |
contrib: return non-zero status if getcoins.py errors
Diffstat (limited to 'contrib/signet')
-rwxr-xr-x | contrib/signet/getcoins.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/signet/getcoins.py b/contrib/signet/getcoins.py index 86755e6305..dc203f1254 100755 --- a/contrib/signet/getcoins.py +++ b/contrib/signet/getcoins.py @@ -30,11 +30,11 @@ def bitcoin_cli(rpc_command_and_params): return subprocess.check_output(argv).strip().decode() except FileNotFoundError: print('The binary', args.cmd, 'could not be found.') - exit() + exit(1) except subprocess.CalledProcessError: cmdline = ' '.join(argv) print(f'-----\nError while calling "{cmdline}" (see output above).') - exit() + exit(1) if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET: @@ -42,7 +42,7 @@ if args.faucet.lower() == DEFAULT_GLOBAL_FAUCET: curr_signet_hash = bitcoin_cli(['getblockhash', '1']) if curr_signet_hash != GLOBAL_FIRST_BLOCK_HASH: print('The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet to use this functionality.\n') - exit() + exit(1) if args.addr == '': # get address for receiving coins @@ -53,7 +53,7 @@ try: res = requests.post(args.faucet, data=data) except: print('Unexpected error when contacting faucet:', sys.exc_info()[0]) - exit() + exit(1) # Display the output as per the returned status code if res: |