From b9372d73006498994b9eea014ee52361122e59f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 8 Feb 2016 13:04:02 +0100 Subject: [PATCH] Fixed wrongly positioned parenthesis Caused an internal server error if / was requested with a different default language than english that was not available in the i18n bundles. --- src/octoprint/server/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 83fdcdde..8c58a766 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -29,7 +29,7 @@ _valid_div_re = re.compile("[a-zA-Z_-]+") @app.route("/") @util.flask.preemptively_cached(cache=preemptiveCache, - data=lambda: dict(path=request.path, base_url=request.url_root, query_string="l10n={}".format(g.locale.language)) if g.locale else "en", + data=lambda: dict(path=request.path, base_url=request.url_root, query_string="l10n={}".format(g.locale.language) if g.locale else "en"), unless=lambda: request.url_root in settings().get(["server", "preemptiveCache", "exceptions"])) @util.flask.conditional(lambda: _check_etag_and_lastmodified_for_index(), NOT_MODIFIED) @util.flask.cached(timeout=-1,