Renamed locale settings names
authorThierry Florac <tflorac@ulthar.net>
Wed, 03 Oct 2018 09:36:25 +0200
changeset 238 29ff8ff964da
parent 237 f7c3038259e7
child 239 dd66b48f53da
Renamed locale settings names
src/pyams_utils/i18n.py
--- a/src/pyams_utils/i18n.py	Tue Oct 02 09:57:17 2018 +0200
+++ b/src/pyams_utils/i18n.py	Wed Oct 03 09:36:25 2018 +0200
@@ -74,6 +74,6 @@
 def set_locales(config):
     """Define locale environment variables"""
     for attr in ('LC_CTYPE', 'LC_COLLATE', 'LC_TIME', 'LC_MONETARY', 'LC_NUMERIC', 'LC_ALL'):
-        value = config.get('pyams.{0}'.format(attr.lower()))
-        if value is not None:
+        value = config.get('pyams.locale.{0}'.format(attr.lower()))
+        if value:
             locale.setlocale(getattr(locale, attr), value)