Fixing themes
This commit is contained in:
parent
474a56ce90
commit
06d70c4b96
@ -68,7 +68,7 @@ def register_themes(app_config, builtin_dir=BUILTIN_THEME_DIR):
|
|||||||
|
|
||||||
themedata = themedata_for_theme_dir(themedir, abs_themedir)
|
themedata = themedata_for_theme_dir(themedir, abs_themedir)
|
||||||
registry[themedir] = themedata
|
registry[themedir] = themedata
|
||||||
|
|
||||||
# Built-in themes
|
# Built-in themes
|
||||||
if os.path.exists(builtin_dir):
|
if os.path.exists(builtin_dir):
|
||||||
_install_themes_in_dir(builtin_dir)
|
_install_themes_in_dir(builtin_dir)
|
||||||
@ -79,11 +79,9 @@ def register_themes(app_config, builtin_dir=BUILTIN_THEME_DIR):
|
|||||||
_install_themes_in_dir(theme_install_dir)
|
_install_themes_in_dir(theme_install_dir)
|
||||||
|
|
||||||
current_theme_name = app_config.get('theme')
|
current_theme_name = app_config.get('theme')
|
||||||
if current_theme_name \
|
try:
|
||||||
and registry.has_key(current_theme_name):
|
|
||||||
current_theme = registry[current_theme_name]
|
current_theme = registry[current_theme_name]
|
||||||
else:
|
except KeyError:
|
||||||
current_theme = None
|
current_theme = None
|
||||||
|
|
||||||
return registry, current_theme
|
return registry, current_theme
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user