diff options
author | Corey Bryant <corey.bryant@canonical.com> | 2018-02-28 10:49:24 -0500 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2018-06-29 16:28:38 +0000 |
commit | 085310c89c744a78fa09d7b6eed32a3e325c18df (patch) | |
tree | 6b8e8bae2f38fa3e05210a89644ddea568415d93 | |
parent | e5d7f400058c789baaccf6b531d1bca8b3e85a55 (diff) | |
download | cliff-085310c89c744a78fa09d7b6eed32a3e325c18df.tar.gz |
In version 0.7.3, cmd2 moved the parsed method from class Cmd()
to class ParserManager().
Change-Id: Ie0c057ffaeaa05c4f5e0f3599aab850245c55066
Closes-Bug: #1751822
-rw-r--r-- | cliff/interactive.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cliff/interactive.py b/cliff/interactive.py index 74b5f54..68f7959 100644 --- a/cliff/interactive.py +++ b/cliff/interactive.py @@ -111,7 +111,13 @@ class InteractiveApp(cmd2.Cmd): # Dispatch to the underlying help command, # which knows how to provide help for extension # commands. - self.default(self.parsed('help ' + arg)) + try: + # NOTE(coreycb): This try path can be removed once + # requirements.txt has cmd2 >= 0.7.3. + parsed = self.parsed + except AttributeError: + parsed = self.parser_manager.parsed + self.default(parsed('help ' + arg)) else: cmd2.Cmd.do_help(self, arg) cmd_names = sorted([n for n, v in self.command_manager]) |