[core/theme] Handle errors during color loading

When loading a color scheme (e.g. wal) fails for some reason, do not
abort bumblebee-status. Instead, log an error message and continue
without the colors.

fixes #263
This commit is contained in:
Tobias Witek 2018-05-30 09:22:53 +02:00
parent 550522bf7c
commit 455707c583

View file

@ -160,8 +160,11 @@ class Theme(object):
def _load_colors(self, name):
"""Load colors for a theme"""
try:
if name == "wal":
return self._load_wal_colors()
except Exception as e:
logging.error("failed to load colors: {}".format(str(e)))
def _load_icons(self, name):
"""Load icons for a theme"""