Fixing bug where not all conditions returned a language in get_locale_from_request()
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 2 Dec 2012 01:36:52 +0000 (19:36 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 2 Dec 2012 01:36:52 +0000 (19:36 -0600)
Just had to change the indentation level of the last commit.

mediagoblin/tools/translate.py

index 28b7aec0a8ecdfdc496a4046b1cbf4fc4ede7ff6..2d83316e949bbdb04b2b436b64188ffb4de4dcf3 100644 (file)
@@ -89,7 +89,8 @@ def get_locale_from_request(request):
         # the most preferred, or fall back to 'en' immediately.
         target_lang = request.accept_languages.best_match(
             mg_globals.available_locales) or 'en'
-        return locale_to_lower_upper(target_lang)
+
+    return locale_to_lower_upper(target_lang)
 
 SETUP_GETTEXTS = {}