Ran publicip.py through black
This commit is contained in:
parent
9a6e61173f
commit
284662a0ba
1 changed files with 16 additions and 13 deletions
|
@ -76,6 +76,7 @@ def update_publicip_information(module):
|
|||
# Wait __interval seconds before checking for default route changes again
|
||||
time.sleep(__interval)
|
||||
|
||||
|
||||
class Module(core.module.Module):
|
||||
@core.decorators.every(minutes=60)
|
||||
def __init__(self, config, theme):
|
||||
|
@ -91,11 +92,11 @@ class Module(core.module.Module):
|
|||
|
||||
def publicip(self, widget):
|
||||
return self._format.format(
|
||||
ip = widget.get("public_ip", "-"),
|
||||
country_name = widget.get("country_name", "-"),
|
||||
country_code = widget.get("country_code", "-"),
|
||||
city_name = widget.get("city_name", "-"),
|
||||
coordinates = widget.get("coordinates", "-")
|
||||
ip=widget.get("public_ip", "-"),
|
||||
country_name=widget.get("country_name", "-"),
|
||||
country_code=widget.get("country_code", "-"),
|
||||
city_name=widget.get("city_name", "-"),
|
||||
coordinates=widget.get("coordinates", "-"),
|
||||
)
|
||||
|
||||
def __click_update(self, event):
|
||||
|
@ -104,7 +105,9 @@ class Module(core.module.Module):
|
|||
def update(self):
|
||||
if self.__thread is not None and self.__thread.is_alive():
|
||||
return
|
||||
self.__thread = threading.Thread(target=update_publicip_information, args=(self,))
|
||||
self.__thread = threading.Thread(
|
||||
target=update_publicip_information, args=(self,)
|
||||
)
|
||||
self.__thread.start()
|
||||
|
||||
def state(self, widget):
|
||||
|
|
Loading…
Reference in a new issue