From c99a2d253e5eef1ba82a226fe9ed7fecb389af2f Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 13 May 2018 07:15:42 +0200 Subject: [PATCH] [modules/pacman] Use slight refactoring for consistency --- bumblebee/modules/pacman.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bumblebee/modules/pacman.py b/bumblebee/modules/pacman.py index 3a24f5f..546c43a 100644 --- a/bumblebee/modules/pacman.py +++ b/bumblebee/modules/pacman.py @@ -13,6 +13,7 @@ Requires the following executables: import os import threading +import bumblebee.util import bumblebee.input import bumblebee.output import bumblebee.engine @@ -48,11 +49,9 @@ class Module(bumblebee.engine.Module): bumblebee.output.Widget(full_text=self.updates) ) self._count = 0 - self._sum = True if self.parameter("sum") == "True" else False - def updates(self, widget): - if (self._sum): + if bumblebee.util.asbool(self.parameter("sum")): return str(sum(map(lambda x: widget.get(x, 0), repos))) return '/'.join(map(lambda x: str(widget.get(x, 0)), repos))