mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Add built-in types support for 'type' argument in the actions map
This commit is contained in:
parent
0e2281de43
commit
13213025a1
1 changed files with 3 additions and 0 deletions
|
@ -519,6 +519,9 @@ class ActionsMap(object):
|
|||
for argn, argp in arguments.items():
|
||||
names = top_parser.format_arg_names(argn,
|
||||
argp.pop('full', None))
|
||||
try: argp['type'] = eval(argp['type'])
|
||||
except: pass
|
||||
|
||||
try:
|
||||
extra = argp.pop('extra')
|
||||
arg_dest = (parser.add_argument(*names, **argp)).dest
|
||||
|
|
Loading…
Add table
Reference in a new issue