revert to the default theme if the selected themes stylesheet is missing

This commit is contained in:
Damien Churchill 2010-01-27 20:23:15 +00:00
parent a4e12c1d94
commit 976824ad99
1 changed files with 3 additions and 0 deletions

View File

@ -400,8 +400,11 @@ class TopLevel(resource.Resource):
self.putChild("tracker", Tracker())
theme = component.get("DelugeWeb").config["theme"]
if not os.path.isfile(rpath("css", "xtheme-%s.css" % theme)):
theme = CONFIG_DEFAULTS.get("theme")
self.__stylesheets.insert(1, "/css/xtheme-%s.css" % theme)
@property
def scripts(self):
return self.__scripts