Ignore unsupported locale setting and silently fall back to 'C'.
--- a/VirtualMailManager/__init__.py Wed Sep 09 07:13:20 2009 +0000
+++ b/VirtualMailManager/__init__.py Thu Sep 10 01:42:26 2009 +0000
@@ -11,9 +11,12 @@
from constants.VERSION import *
import constants.ERROR as ERR
-# Set all of the locales according to the current environment variables
-# and get the character encoding.
-locale.setlocale(locale.LC_ALL, '')
+# Try to set all of the locales according to the current
+# environment variables and get the character encoding.
+try:
+ locale.setlocale(locale.LC_ALL, '')
+except locale.Error:
+ locale.setlocale(locale.LC_ALL, 'C')
ENCODING = locale.nl_langinfo(locale.CODESET)
def w_std(*args):