From 44c1fe4840ea6dbeea559b337e78ce956c1f7e6a Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Thu, 19 May 2011 18:10:21 +0100 Subject: [PATCH] Definitely a bad day for commits. Thanks kmike for reviewing --- pelican/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index eea1ae0b..08c36a82 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -60,12 +60,14 @@ def read_settings(filename): locales = [locales] # try to set the different locales, fallback on the default. - for locale_ in context['LOCALE']: + for locale_ in locales: try: locale.setlocale(locale.LC_ALL, locale_) break # break if it is successfull except locale.Error: pass + else: + warnings.warn("LOCALE option doesn't contain a correct value") # set the locale return context