mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 23:37:44 +01:00
Use sys.exit(...) instead of exit(...): exit(...) should not be used in programs
This commit is contained in:
@@ -87,7 +87,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
|
||||
for x,resp_obj in enumerate(reply):
|
||||
if rpc.response_is_error(resp_obj):
|
||||
print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
assert(resp_obj['id'] == x) # assume replies are in-sequence
|
||||
if settings['rev_hash_bytes'] == 'true':
|
||||
resp_obj['result'] = hex_switchEndian(resp_obj['result'])
|
||||
|
||||
Reference in New Issue
Block a user