[core/themes] Fix exception on missing theme

If no theme is found, raise an exception.

see #203
This commit is contained in:
Tobias Witek 2017-11-18 14:59:30 +01:00
parent 9d81d83d37
commit 56b2981379

View file

@ -148,6 +148,8 @@ class Theme(object):
except ValueError as exception: except ValueError as exception:
raise bumblebee.error.ThemeLoadError("JSON error: {}".format(exception)) raise bumblebee.error.ThemeLoadError("JSON error: {}".format(exception))
if not result:
raise bumblebee.error.ThemeLoadError("no such theme")
return result return result
def _get(self, widget, name, default=None): def _get(self, widget, name, default=None):