From 455707c583f44d0c23cafd87bc86e7b480de2390 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Wed, 30 May 2018 09:22:53 +0200 Subject: [PATCH] [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 --- bumblebee/theme.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bumblebee/theme.py b/bumblebee/theme.py index c68c6f8..891094d 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -160,8 +160,11 @@ class Theme(object): def _load_colors(self, name): """Load colors for a theme""" - if name == "wal": - return self._load_wal_colors() + 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"""