summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-11-08 08:00:51 -0500
committerRob Crittenden <rcritten@redhat.com>2013-02-18 13:07:17 -0500
commit5ee2216f4973645f18f0ed8eac3c874d81e044ab (patch)
tree34784ae0c4236e81ecc539b37a6d9ff7872f31c4 /ipalib/plugable.py
parent1e2437ece1f5d645ab5ab12628021798bb7b9e1a (diff)
downloadfreeipa-5ee2216f4973645f18f0ed8eac3c874d81e044ab.tar.gz
freeipa-5ee2216f4973645f18f0ed8eac3c874d81e044ab.tar.xz
freeipa-5ee2216f4973645f18f0ed8eac3c874d81e044ab.zip
Store the OptionParser in the API, use it to print unified help messages
Make `ipa -h` and `ipa help` output the same message. Since `ipa -h` output is generated by the OptionParser, we need to make the parser available. Store it in `api.parser`. Part of the effort for https://fedorahosted.org/freeipa/ticket/3060
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 461497954..d2541e3b7 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -593,6 +593,7 @@ class API(DictProxy):
if context is not None:
overrides['context'] = context
self.bootstrap(**overrides)
+ object.__setattr__(self, 'parser', parser)
return (options, args)
def load_plugins(self):