[modules/arch-update] log exceptions
This commit is contained in:
parent
fde51b3f79
commit
e4f7019f5b
2 changed files with 5 additions and 2 deletions
|
@ -21,5 +21,4 @@
|
||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
Add info about error widget and events for error logging
|
Add info about error widget and events for error logging
|
||||||
- generate rst instead of markdown (list of modules)
|
|
||||||
- add module contributor doc
|
- add module contributor doc
|
||||||
|
|
|
@ -4,6 +4,9 @@ Requires the following executable:
|
||||||
* checkupdates (from pacman-contrib)
|
* checkupdates (from pacman-contrib)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
import core.module
|
import core.module
|
||||||
import core.widget
|
import core.widget
|
||||||
import core.decorators
|
import core.decorators
|
||||||
|
@ -31,7 +34,8 @@ class Module(core.module.Module):
|
||||||
try:
|
try:
|
||||||
result = util.cli.execute("checkupdates")
|
result = util.cli.execute("checkupdates")
|
||||||
self.__packages = len(result.split("\n")) - 1
|
self.__packages = len(result.split("\n")) - 1
|
||||||
except:
|
except as e:
|
||||||
|
logging.exception(e)
|
||||||
self.__packages = -1
|
self.__packages = -1
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
|
|
Loading…
Reference in a new issue