summaryrefslogtreecommitdiff
path: root/cliff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-06-10 08:49:01 +0000
committerGerrit Code Review <review@openstack.org>2020-06-10 08:49:01 +0000
commit6989b47cc234444b7357b47b61c9a9308d0ea06e (patch)
treeb52057d5b83f76679fd63d36f974aa3843d74c8b /cliff
parent7268eea70b959655cd058e6178b85f0a69dda7c5 (diff)
parentb0fb8daff0f4c01bdc526691e24d2cedc6e08e10 (diff)
downloadcliff-6989b47cc234444b7357b47b61c9a9308d0ea06e.tar.gz
Merge "Fix compatibility with new cmd2"
Diffstat (limited to 'cliff')
-rw-r--r--cliff/interactive.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/cliff/interactive.py b/cliff/interactive.py
index 4341d09..517061e 100644
--- a/cliff/interactive.py
+++ b/cliff/interactive.py
@@ -175,9 +175,18 @@ class InteractiveApp(cmd2.Cmd):
statement.parsed.args = ' '.join(sub_argv)
else:
# cmd2 >= 0.9.1 uses shlex and gives us a Statement.
- statement.command = cmd_name
- statement.argv = [cmd_name] + sub_argv
- statement.args = ' '.join(statement.argv)
+ statement = cmd2.Statement(
+ ' '.join(sub_argv),
+ raw=statement.raw,
+ command=cmd_name,
+ arg_list=sub_argv,
+ multiline_command=statement.multiline_command,
+ terminator=statement.terminator,
+ suffix=statement.suffix,
+ pipe_to=statement.pipe_to,
+ output=statement.output,
+ output_to=statement.output_to,
+ )
return statement
def cmdloop(self):