Fix exception in location.py.
This commit is contained in:
parent
8458eef1e6
commit
2a77e3a85c
2 changed files with 11 additions and 3 deletions
|
@ -59,11 +59,11 @@ def __load():
|
|||
__next = time.time() + 60 * 30 # error - try again every 30m
|
||||
|
||||
|
||||
def __get(name, default=None):
|
||||
def __get(name):
|
||||
global __data
|
||||
if not __data or __expired():
|
||||
__load()
|
||||
return __data.get(name, default)
|
||||
return __data[name]
|
||||
|
||||
|
||||
def reset():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue