summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index 3fb7e34..a4cb2e2 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -350,7 +350,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',