diff --git a/bumblebee/theme.py b/bumblebee/theme.py index d7e8471..3d5b114 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -226,7 +226,7 @@ class Theme(object): if not self._widget: self._widget = widget - if self._widget.get("theme.exclude", "") == name: + if name in bumblebee.util.aslist(self._widget.get("theme.exclude", "")): return None if self._widget != widget: diff --git a/bumblebee/util.py b/bumblebee/util.py index fdd3af5..0d12105 100644 --- a/bumblebee/util.py +++ b/bumblebee/util.py @@ -19,6 +19,13 @@ def asbool(val): val = str(val).strip().lower() return val in ("t", "true", "y", "yes", "on", "1") +def aslist(val): + if val is None: + return [] + if isinstance(val, list): + return val + return str(val).replace(' ', '').split(',') + def execute(cmd, wait=True): logging.info("executing command '{}'".format(cmd)) args = shlex.split(cmd)