# HG changeset patch # User Thomas Waldmann # Date 1299935662 -3600 # Node ID ddc707d70d9d21d01ac222a923c2a528eb463cb6 # Parent 1d900f3cf7bb1a18ca4b139d95401ff0900e374d# Parent 9ca492c520704f8709956fc0844edf27c2dce1e5 merged MattMaker's changes diff -r 1d900f3cf7bb -r ddc707d70d9d MoinMoin/themes/__init__.py --- a/MoinMoin/themes/__init__.py Fri Mar 11 13:17:05 2011 +0100 +++ b/MoinMoin/themes/__init__.py Sat Mar 12 14:14:22 2011 +0100 @@ -31,7 +31,13 @@ theme_name = u.theme_name else: theme_name = app.cfg.theme_default - return get_theme(theme_name) + try: + return get_theme(theme_name) + except KeyError: + logging.warning("theme %s was not found; using default of %s instead." % (theme_name, app.cfg.theme_default)) + theme_name = app.cfg.theme_default + return get_theme(theme_name) + def render_template(template, **context):