Merge pull request #478 from JohnDowson/List-exclude
theme.exclude now takes a comma separated list
This commit is contained in:
commit
3d6448cca6
2 changed files with 8 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue