mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-12 09:11:55 -06:00
789cba4378
As a consequence of using doc=_('some message') the _() method was returning a Gettext instance, thus when optparse was handed the help text it received a Gettext instance instead of a basestring. optparse tried to operate on the Gettext instance as if it were a basestring and since it wasn't threw an exception. The fix is to promote (e.g. cast) the option.doc to unicode. If the option.doc was a str it becomes unicode, if it was unicode nothing happens, if it was Gettext (or any other object implementing the __unicode__() method) object is converted to unicode via the objects rules. By the way, while debugging this I discovered strings which were not localized, sometimes option.doc would be a str and sometimes a Gettext object. In a subsequent patch I'll fix all those unlocalized doc strings, but I don't want to bury this fix along with a load of string fixes. |
||
---|---|---|
.. | ||
plugins | ||
__init__.py | ||
aci.py | ||
backend.py | ||
base.py | ||
cli.py | ||
compat.py | ||
config.py | ||
constants.py | ||
crud.py | ||
encoder.py | ||
errors.py | ||
frontend.py | ||
ipauuid.py | ||
output.py | ||
parameters.py | ||
pkcs10.py | ||
plugable.py | ||
request.py | ||
rpc.py | ||
text.py | ||
util.py | ||
x509.py |