summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-05-31 09:39:10 +0200
committerRob Crittenden <rcritten@redhat.com>2011-06-06 13:22:36 -0400
commit31bf405fe3a1e1d84380bd9c787e7f69b31927ce (patch)
treefb4d78157184e4b91abec27c2743d034171375cd /ipalib
parentd7c60205a6232f52eec80126a649b1319ed77974 (diff)
downloadfreeipa-31bf405fe3a1e1d84380bd9c787e7f69b31927ce.tar.gz
freeipa-31bf405fe3a1e1d84380bd9c787e7f69b31927ce.tar.xz
freeipa-31bf405fe3a1e1d84380bd9c787e7f69b31927ce.zip
Localization fails for MaxArgumentError
When MaxArgumentError si raised, the string localized by ngettext is not printed properly. https://fedorahosted.org/freeipa/ticket/1148
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/errors.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 53554b77e..55bb8a38b 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -263,7 +263,10 @@ class PublicError(StandardError):
self.format = format
self.forwarded = False
self.msg = self.format % kw
- self.strerror = ugettext(self.format) % kw
+ if isinstance(self.format, basestring):
+ self.strerror = ugettext(self.format) % kw
+ else:
+ self.strerror = self.format % kw
else:
if type(message) is not unicode:
raise TypeError(