[modules/publicip] add nicer logging
This commit is contained in:
parent
05f0e08493
commit
0f74b690ca
1 changed files with 5 additions and 2 deletions
|
@ -36,6 +36,9 @@ import core.decorators
|
||||||
|
|
||||||
import util.format
|
import util.format
|
||||||
import util.location
|
import util.location
|
||||||
|
import logging
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Module(core.module.Module):
|
class Module(core.module.Module):
|
||||||
|
@ -140,7 +143,7 @@ class Module(core.module.Module):
|
||||||
core.event.trigger("update", [widget.module.id], redraw_only=True)
|
core.event.trigger("update", [widget.module.id], redraw_only=True)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
widget.set("public_ip", None)
|
widget.set("public_ip", None)
|
||||||
print(ex)
|
logging.error(str(ex))
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
return widget.get("state", None)
|
return widget.get("state", None)
|
||||||
|
|
Loading…
Reference in a new issue