mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] remove useless exception
This commit is contained in:
parent
a1395bdec6
commit
eed5cde8d2
1 changed files with 7 additions and 8 deletions
|
@ -570,7 +570,6 @@ class ActionsMap(object):
|
||||||
# Add arguments to the parser
|
# Add arguments to the parser
|
||||||
def _add_arguments(tid, parser, arguments):
|
def _add_arguments(tid, parser, arguments):
|
||||||
for argument_name, argument_options in arguments.items():
|
for argument_name, argument_options in arguments.items():
|
||||||
print argument_options
|
|
||||||
names = top_parser.format_arg_names(str(argument_name),
|
names = top_parser.format_arg_names(str(argument_name),
|
||||||
argument_options.pop('full', None))
|
argument_options.pop('full', None))
|
||||||
try:
|
try:
|
||||||
|
@ -578,14 +577,14 @@ class ActionsMap(object):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
if "extra" not in argument_options:
|
||||||
|
parser.add_argument(*names, **argument_options)
|
||||||
|
continue
|
||||||
|
|
||||||
extra = argument_options.pop('extra')
|
extra = argument_options.pop('extra')
|
||||||
arg_dest = (parser.add_argument(*names, **argument_options)).dest
|
arg_dest = (parser.add_argument(*names, **argument_options)).dest
|
||||||
self.extraparser.add_argument(tid, arg_dest, extra,
|
self.extraparser.add_argument(tid, arg_dest, extra,
|
||||||
validate_extra)
|
validate_extra)
|
||||||
except KeyError:
|
|
||||||
# No extra parameters
|
|
||||||
parser.add_argument(*names, **argument_options)
|
|
||||||
|
|
||||||
# Instantiate parser
|
# Instantiate parser
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue