diff --git a/bumblebee/engine.py b/bumblebee/engine.py index 9f31e06..df5b0da 100644 --- a/bumblebee/engine.py +++ b/bumblebee/engine.py @@ -40,7 +40,6 @@ class Module(object): self.id = self.name self._next = int(time.time()) self._default_interval = 0 - self.success = True self._configFile = None for cfg in [os.path.expanduser("~/.bumblebee-status.conf"), os.path.expanduser("~/.config/bumblebee-status.conf")]: @@ -81,12 +80,7 @@ class Module(object): def update_wrapper(self, widgets): if self._next > int(time.time()): return - try: - self.update(self._widgets) - self.success = True - except Exception as e: - log.error("failed to update module {}: {}".format(self.name, str(e))) - self.success = False + self.update(self._widgets) self._next += int(self.parameter("interval", self._default_interval))*60 def interval(self, intvl): diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 5367d5f..57a12cc 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -105,9 +105,8 @@ class Module(bumblebee.engine.Module): state.append("AC") else: charge = "" - try: - with open("{}/status".format(widget.name)) as f: - charge = f.read().strip() + with open("{}/status".format(widget.name)) as f: + charge = f.read().strip() except IOError: pass if charge == "Discharging": diff --git a/bumblebee/modules/spacer.py b/bumblebee/modules/spacer.py index adabcff..b89c233 100644 --- a/bumblebee/modules/spacer.py +++ b/bumblebee/modules/spacer.py @@ -17,9 +17,6 @@ class Module(bumblebee.engine.Module): ) self._text = self.parameter("text", "") - def update(self, widgets): - raise Exception("test") - def text(self, widget): return self._text