diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-06-01 10:37:13 -0400 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-06-01 10:37:13 -0400 |
commit | cb6222fec44a62294c8e951bebae93fbdc9c8047 (patch) | |
tree | 91d997ebef8831df7f99727ea65fb27c668efefb /cliff/interactive.py | |
parent | 9059e9538a449f0fc36ad4b43cadc6bd8a2f1e0e (diff) | |
download | cliff-tablib-cb6222fec44a62294c8e951bebae93fbdc9c8047.tar.gz |
pep8 cleanup
Diffstat (limited to 'cliff/interactive.py')
-rw-r--r-- | cliff/interactive.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cliff/interactive.py b/cliff/interactive.py index 35fcc47..77aea9a 100644 --- a/cliff/interactive.py +++ b/cliff/interactive.py @@ -22,7 +22,8 @@ class InteractiveApp(cmd2.Cmd): :param parent_app: The calling application (expected to be derived from :class:`cliff.main.App`). - :param command_manager: A :class:`cliff.commandmanager.CommandManager` instance. + :param command_manager: A :class:`cliff.commandmanager.CommandManager` + instance. :param stdin: Standard input stream :param stdout: Standard output stream """ @@ -67,10 +68,11 @@ class InteractiveApp(cmd2.Cmd): # coming from the command manager arg_parts = shlex.split(arg) method_name = '_'.join( - itertools.chain(['do'], - itertools.takewhile(lambda x: not x.startswith('-'), - arg_parts) - ) + itertools.chain( + ['do'], + itertools.takewhile(lambda x: not x.startswith('-'), + arg_parts) + ) ) # Have the command manager version of the help # command produce the help text since cmd and @@ -102,7 +104,8 @@ class InteractiveApp(cmd2.Cmd): # command names by default. line_parts = shlex.split(statement.parsed.raw) try: - cmd_factory, cmd_name, sub_argv = self.command_manager.find_command(line_parts) + the_cmd = self.command_manager.find_command(line_parts) + cmd_factory, cmd_name, sub_argv = the_cmd except ValueError: # Not a plugin command pass |