fixed exception caused by probably check for missing block
This commit is contained in:
parent
0dc6a0b6c5
commit
3e8d76e246
@ -198,7 +198,10 @@ class API:
|
|||||||
elif action == 'getData':
|
elif action == 'getData':
|
||||||
if self._utils.validateHash(data):
|
if self._utils.validateHash(data):
|
||||||
if not os.path.exists('data/blocks/' + data + '.db'):
|
if not os.path.exists('data/blocks/' + data + '.db'):
|
||||||
|
try:
|
||||||
resp = base64.b64encode(self._core.getData(data))
|
resp = base64.b64encode(self._core.getData(data))
|
||||||
|
except TypeError:
|
||||||
|
resp = ""
|
||||||
if resp == False:
|
if resp == False:
|
||||||
abort(404)
|
abort(404)
|
||||||
resp = ""
|
resp = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user