From 5ee2216f4973645f18f0ed8eac3c874d81e044ab Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 8 Nov 2012 08:00:51 -0500 Subject: 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 --- ipalib/plugable.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ipalib/plugable.py') 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): -- cgit