diff --git a/modules/contrib/arch-update.py b/modules/contrib/arch-update.py index 493fa3d..a8c73c7 100644 --- a/modules/contrib/arch-update.py +++ b/modules/contrib/arch-update.py @@ -22,14 +22,17 @@ class Module(core.module.Module): return self.parameter("format", "Update Arch: {}") def utilization(self, widget): - return self.__format.format(self.__packages) + return self.__format.format(self.__packages if self.__packages >= 0 else "n/a") def hidden(self): return self.__packages == 0 def update(self): - result = util.cli.execute("checkupdates") - self.__packages = len(result.split("\n")) - 1 + try: + result = util.cli.execute("checkupdates") + self.__packages = len(result.split("\n")) - 1 + except: + self.__packages = -1 def state(self, widget): return self.threshold_state(self.__packages, 1, 100)