summaryrefslogtreecommitdiffstats
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-10-01 12:52:32 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-10-01 12:52:32 +0100
commitbdbfbc34b841ec7cfa9c28ee6cc079db2e228276 (patch)
tree80f4723eda149b27e3dc905131094afdab4c9626 /pykolab/utils.py
parent32fccd69f5857fa4922b20ed7ba29ccdcde1a7ec (diff)
downloadpykolab-bdbfbc34b841ec7cfa9c28ee6cc079db2e228276.tar.gz
Prevent traceback on undefined Error exception (#1014)
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index a4cb2e2..c74759b 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -352,7 +352,8 @@ def translate(mystring, locale_name='en_US'):
try:
locale.setlocale(locale.LC_ALL, (locale_name,locale_charset))
- except Error, errmsg:
+ except:
+ log.error(_("Could not set locale to %r,%r") % (local_name,locale_charset))
pass
command = [ '/usr/bin/iconv',