From e4f7019f5bfc4ba74e38b8ea753bb1f411cf608b Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Fri, 8 May 2020 16:09:10 +0200 Subject: [PATCH] [modules/arch-update] log exceptions --- docs/other/NOTES.md | 1 - modules/contrib/arch-update.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/other/NOTES.md b/docs/other/NOTES.md index 8e7aa1c..d694294 100644 --- a/docs/other/NOTES.md +++ b/docs/other/NOTES.md @@ -21,5 +21,4 @@ # documentation Add info about error widget and events for error logging -- generate rst instead of markdown (list of modules) - add module contributor doc diff --git a/modules/contrib/arch-update.py b/modules/contrib/arch-update.py index a8c73c7..210c6e2 100644 --- a/modules/contrib/arch-update.py +++ b/modules/contrib/arch-update.py @@ -4,6 +4,9 @@ Requires the following executable: * checkupdates (from pacman-contrib) """ + +import logging + import core.module import core.widget import core.decorators @@ -31,7 +34,8 @@ class Module(core.module.Module): try: result = util.cli.execute("checkupdates") self.__packages = len(result.split("\n")) - 1 - except: + except as e: + logging.exception(e) self.__packages = -1 def state(self, widget):