[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.location
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Module(core.module.Module):
|
||||
|
@ -140,10 +143,10 @@ class Module(core.module.Module):
|
|||
core.event.trigger("update", [widget.module.id], redraw_only=True)
|
||||
except Exception as ex:
|
||||
widget.set("public_ip", None)
|
||||
print(ex)
|
||||
logging.error(str(ex))
|
||||
|
||||
def state(self, widget):
|
||||
return widget.get("state", None)
|
||||
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Reference in a new issue