Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
4e01956e
Commit
4e01956e
authored
Dec 19, 2012
by
Stavros Sachtouris
Browse files
In shell, ignore unknown - args
parent
02e7658e
Changes
1
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/command_shell.py
View file @
4e01956e
...
...
@@ -154,14 +154,13 @@ class Shell(Cmd):
"""
subcmd
,
cmd_args
=
cmd
.
parse_out
(
split_input
(
line
))
self
.
_history
.
add
(
' '
.
join
([
cmd
.
path
.
replace
(
'_'
,
' '
),
line
]))
cmd_parser
=
ArgumentParseManager
(
cmd
.
name
,
dict
(
self
.
_parser
.
arguments
))
cmd_parser
.
arguments
.
pop
(
'options'
,
None
)
cmd_parser
.
arguments
.
pop
(
'debug'
,
None
)
cmd_parser
.
arguments
.
pop
(
'verbose'
,
None
)
cmd_parser
.
arguments
.
pop
(
'include'
,
None
)
cmd_parser
.
arguments
.
pop
(
'silent'
,
None
)
tmp_args
=
dict
(
self
.
_parser
.
arguments
)
tmp_args
.
pop
(
'options'
,
None
)
tmp_args
.
pop
(
'debug'
,
None
)
tmp_args
.
pop
(
'verbose'
,
None
)
tmp_args
.
pop
(
'include'
,
None
)
tmp_args
.
pop
(
'silent'
,
None
)
cmd_parser
=
ArgumentParseManager
(
cmd
.
name
,
dict
(
tmp_args
))
cmd_parser
.
parser
.
description
=
subcmd
.
help
...
...
@@ -193,7 +192,8 @@ class Shell(Cmd):
arg
.
default
)
exec_cmd
(
instance
,
cmd_parser
.
unparsed
,
[
term
for
term
in
cmd_parser
.
unparsed
\
if
not
term
.
startswith
(
'-'
)],
cmd_parser
.
parser
.
print_help
)
except
(
ClientError
,
CLIError
)
as
err
:
print_error_message
(
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment