diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-05-31 09:39:10 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-06-06 13:22:36 -0400 |
commit | 31bf405fe3a1e1d84380bd9c787e7f69b31927ce (patch) | |
tree | fb4d78157184e4b91abec27c2743d034171375cd | |
parent | d7c60205a6232f52eec80126a649b1319ed77974 (diff) | |
download | freeipa-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
-rw-r--r-- | ipalib/errors.py | 5 |
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( |