Use sys.exit(...) instead of exit(...): exit(...) should not be used in programs

This commit is contained in:
practicalswift committed 2017-08-28 15:18:14 +02:00
1 parent f088a1bb39
commit 25cd520fc4
10 files changed
+30 -28

No files matched your search

+1 -1
View File
@@ -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'])