From a462abb5f3d1c055a8abe9603bee7f5b0910cf15 Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Fri, 11 Jul 2008 19:41:19 +0000 Subject: [PATCH] fallback to CONFIG_DEFAULTS on unknown temnplate --- deluge/ui/webui/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deluge/ui/webui/utils.py b/deluge/ui/webui/utils.py index eb138f65f..c531d6c73 100644 --- a/deluge/ui/webui/utils.py +++ b/deluge/ui/webui/utils.py @@ -255,6 +255,12 @@ def set_config_defaults(): if not key in config.config: config.config[key] = value changed = True + + from render import render + if not config.get("template") in render.get_templates(): + config.set("template", CONFIG_DEFAULTS["template"]) + changed = True + if changed: config.save()