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':
|
||||
if self._utils.validateHash(data):
|
||||
if not os.path.exists('data/blocks/' + data + '.db'):
|
||||
resp = base64.b64encode(self._core.getData(data))
|
||||
try:
|
||||
resp = base64.b64encode(self._core.getData(data))
|
||||
except TypeError:
|
||||
resp = ""
|
||||
if resp == False:
|
||||
abort(404)
|
||||
resp = ""
|
||||
|
Loading…
Reference in New Issue
Block a user