[util] fix location timeouts
This commit is contained in:
parent
0f74b690ca
commit
1983408e58
2 changed files with 3 additions and 4 deletions
|
@ -113,16 +113,12 @@ class Module(core.module.Module):
|
||||||
|
|
||||||
def __click_update(self, event):
|
def __click_update(self, event):
|
||||||
util.location.reset()
|
util.location.reset()
|
||||||
# pause to allow reset time to complete
|
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
widget = self.widget()
|
widget = self.widget()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
util.location.reset()
|
util.location.reset()
|
||||||
# pause to allow reset time to complete
|
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
# Fetch fresh location information
|
# Fetch fresh location information
|
||||||
__info = util.location.location_info()
|
__info = util.location.location_info()
|
||||||
|
|
|
@ -89,6 +89,9 @@ def __get(name):
|
||||||
def reset():
|
def reset():
|
||||||
"""Resets the location library, ensuring that a new query will be started"""
|
"""Resets the location library, ensuring that a new query will be started"""
|
||||||
global __next
|
global __next
|
||||||
|
global __data
|
||||||
|
|
||||||
|
__data = None
|
||||||
__next = 0
|
__next = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue