[util] fix location timeouts

This commit is contained in:
tobi-wan-kenobi 2022-08-31 19:12:05 +02:00
parent 0f74b690ca
commit 1983408e58
2 changed files with 3 additions and 4 deletions

View file

@ -113,16 +113,12 @@ class Module(core.module.Module):
def __click_update(self, event):
util.location.reset()
# pause to allow reset time to complete
time.sleep(2)
def update(self):
widget = self.widget()
try:
util.location.reset()
# pause to allow reset time to complete
time.sleep(2)
# Fetch fresh location information
__info = util.location.location_info()

View file

@ -89,6 +89,9 @@ def __get(name):
def reset():
"""Resets the location library, ensuring that a new query will be started"""
global __next
global __data
__data = None
__next = 0