From 1983408e58ebdb48d463ac299c26b21bdceb5cbd Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Wed, 31 Aug 2022 19:12:05 +0200 Subject: [PATCH] [util] fix location timeouts --- bumblebee_status/modules/contrib/publicip.py | 4 ---- bumblebee_status/util/location.py | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bumblebee_status/modules/contrib/publicip.py b/bumblebee_status/modules/contrib/publicip.py index ecdbb53..d79c2a1 100644 --- a/bumblebee_status/modules/contrib/publicip.py +++ b/bumblebee_status/modules/contrib/publicip.py @@ -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() diff --git a/bumblebee_status/util/location.py b/bumblebee_status/util/location.py index 1974773..9cd3a10 100644 --- a/bumblebee_status/util/location.py +++ b/bumblebee_status/util/location.py @@ -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