removed walrus from gasnow_file variable
This commit is contained in:
parent
7c364d56a8
commit
d67e67d166
1 changed files with 2 additions and 1 deletions
3
core.py
3
core.py
|
|
@ -379,8 +379,9 @@ def get_beacon_gas_prices(speed=None, cache_interval_seconds=10):
|
|||
speeds = ('rapid', 'fast', 'standard', 'slow',)
|
||||
os.makedirs(cache_folder := './data/cache/', exist_ok=True)
|
||||
gas = {}
|
||||
gasnow_file = "{}/gasnow.json".format(cache_folder)
|
||||
try:
|
||||
gas = json.load(open(gasnow_file := "{}/gasnow.json".format(cache_folder)))
|
||||
gas = json.load(open(gasnow_file))
|
||||
except (JSONDecodeError, FileNotFoundError):
|
||||
pass
|
||||
if not gas or not gas['data'] or (gas['data']['timestamp'] / 1000) + cache_interval_seconds < time.time():
|
||||
|
|
|
|||
Loading…
Reference in a new issue