Branch 'pykolab-0.4' - pykolab/utils.py
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Mon Jul 16 14:11:33 CEST 2012
pykolab/utils.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 178687649d3b74e472b1751ded10304a168391d3
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Jul 16 12:57:11 2012 +0100
Escape unsupported locale setting (#883)
diff --git a/pykolab/utils.py b/pykolab/utils.py
index a8ad952..a518204 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -287,7 +287,10 @@ def translate(mystring, locale_name='en_US'):
else:
locale_charset = 'utf-8'
- locale.setlocale(locale.LC_ALL, (locale_name,locale_charset))
+ try:
+ locale.setlocale(locale.LC_ALL, (locale_name,locale_charset))
+ except Error, errmsg:
+ pass
command = [ '/usr/bin/iconv',
'-f', 'UTF-8',
More information about the commits
mailing list