Fix interactive mode with command line args

The cmdloop in cmd2 looks for a --test option in the parsed arguments which doesn't work if you want to pass other arguments in interactive mode.  If any other arguments are passed in, an exception is thrown.

Change-Id: Iacd3d338dce74f4de9eaf5c9c8ad8ac9f9ae32e3
Closes-Bug: #1103218
This commit is contained in:
Terry Howe 2014-02-20 15:29:58 -07:00
parent 38e5780d26
commit ab1ac30ca2
1 changed files with 3 additions and 0 deletions

View File

@ -113,3 +113,6 @@ class InteractiveApp(cmd2.Cmd):
statement.parsed.command = cmd_name
statement.parsed.args = ' '.join(sub_argv)
return statement
def cmdloop(self):
self._cmdloop()