diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-10-23 18:43:17 -0400 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-10-23 18:45:00 -0400 |
commit | 28898d675df4a205fd11395e28c7c53e504de7b2 (patch) | |
tree | 91a11854b29e7b53973172d41574affa77fce5ce | |
parent | 6bbefff4aa01af99bb2da8b7d4d1ac5afe6e0828 (diff) | |
download | cliff-28898d675df4a205fd11395e28c7c53e504de7b2.tar.gz |
Pass the right args when pulling help from commands
Pass the application, not the HelpCommand, to each command
class when it is instantiated to extract the help text.
Addresses #52
Change-Id: I8de7c37f859a5783b80d6ad8d8eab0099b773e08
-rw-r--r-- | cliff/help.py | 2 | ||||
-rw-r--r-- | docs/source/history.rst | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cliff/help.py b/cliff/help.py index 67571b3..eb007f1 100644 --- a/cliff/help.py +++ b/cliff/help.py @@ -23,7 +23,7 @@ class HelpAction(argparse.Action): app.stdout.write('Could not load %r\n' % ep) continue try: - cmd = factory(self, None) + cmd = factory(app, None) except Exception as err: app.stdout.write('Could not instantiate %r: %s\n' % (ep, err)) continue diff --git a/docs/source/history.rst b/docs/source/history.rst index 240a6cc..3c78ccb 100644 --- a/docs/source/history.rst +++ b/docs/source/history.rst @@ -2,6 +2,12 @@ Release History ================= +dev + +- Fix the arguments passed to commands when they are instantiated to + pull out help. See https://github.com/dreamhost/cliff/issues/52 for + details. + 1.4.5 - Update the pyparsing dependency to a version that supports both |