mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-17 12:14:33 +08:00
get_index_range() should return a tuple; return HTTP status code from RPC
This commit is contained in:
@@ -188,6 +188,8 @@ def get_index_range(working_dir):
|
||||
else:
|
||||
return first_block, last_block - NUM_CONFIRMATIONS
|
||||
|
||||
return None, None
|
||||
|
||||
|
||||
def rpc_traceback():
|
||||
exception_data = traceback.format_exc().splitlines()
|
||||
@@ -899,10 +901,10 @@ class BlockstackdRPC(BoundedThreadingMixIn, SimpleXMLRPCServer):
|
||||
Return {'error': ...} on error
|
||||
"""
|
||||
if not check_name(name):
|
||||
return {'error': 'invalid name'}
|
||||
return {'error': 'invalid name', 'http_status': 400}
|
||||
|
||||
if not check_count(page):
|
||||
return {'error': 'invalid page'}
|
||||
return {'error': 'invalid page', 'http_status': 400}
|
||||
|
||||
page_size = 20
|
||||
offset = page * page_size
|
||||
|
||||
Reference in New Issue
Block a user