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
ee4c47d7
Commit
ee4c47d7
authored
Dec 06, 2012
by
Stavros Sachtouris
Browse files
Cleanup deprecated method in argument
parent
7c2247a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
kamaki/cli/__init__.py
View file @
ee4c47d7
...
...
@@ -36,7 +36,7 @@ from sys import argv, exit, stdout
from
os.path
import
basename
from
inspect
import
getargspec
from
kamaki.cli.argument
import
_a
rgument
s
,
parse_known_args
,
update_arguments
from
kamaki.cli.argument
import
A
rgument
ParseManager
from
kamaki.cli.history
import
History
from
kamaki.cli.utils
import
print_dict
,
print_list
,
red
,
magenta
,
yellow
from
kamaki.cli.errors
import
CLIError
...
...
@@ -408,9 +408,6 @@ def run_shell(exe_string, arguments):
shell
.
run
(
arguments
)
from
kamaki.cli.argument
import
ArgumentParseManager
def
main
():
try
:
exe
=
basename
(
argv
[
0
])
...
...
kamaki/cli/argument.py
View file @
ee4c47d7
...
...
@@ -448,17 +448,6 @@ class ArgumentParseManager(object):
self
.
_parser_modified
=
False
def
parse_known_args
(
parser
,
arguments
=
None
):
"""Fill in arguments from user input"""
parsed
,
unparsed
=
parser
.
parse_known_args
()
for
name
,
arg
in
arguments
.
items
():
arg
.
value
=
getattr
(
parsed
,
name
,
arg
.
default
)
newparsed
=
[]
for
term
in
unparsed
:
newparsed
+=
split_input
(
'
\'
%s
\'
'
%
term
)
return
parsed
,
newparsed
def
update_arguments
(
parser
,
arguments
):
"""Update arguments dict from user input
...
...
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