simple bypass for soft failure
This commit is contained in:
parent
e195319cdf
commit
bf20f634b3
|
@ -32,6 +32,7 @@ class Cache(object):
|
||||||
}
|
}
|
||||||
headers = {'accept': 'application/json'}
|
headers = {'accept': 'application/json'}
|
||||||
url = 'https://api.coingecko.com/api/v3/coins/wownero'
|
url = 'https://api.coingecko.com/api/v3/coins/wownero'
|
||||||
|
try:
|
||||||
r = r_get(url, headers=headers, data=data)
|
r = r_get(url, headers=headers, data=data)
|
||||||
info = {
|
info = {
|
||||||
'genesis_date': r.json()['genesis_date'],
|
'genesis_date': r.json()['genesis_date'],
|
||||||
|
@ -44,5 +45,7 @@ class Cache(object):
|
||||||
}
|
}
|
||||||
self.store_data("coin_info", 15, json_dumps(info))
|
self.store_data("coin_info", 15, json_dumps(info))
|
||||||
return info
|
return info
|
||||||
|
except:
|
||||||
|
return {}
|
||||||
|
|
||||||
cache = Cache()
|
cache = Cache()
|
||||||
|
|
Loading…
Reference in New Issue