mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Allow number in argument name and fix variable name in actionsmap
This commit is contained in:
parent
6c726f3c2f
commit
df5cd5ad7f
1 changed files with 2 additions and 2 deletions
|
@ -372,7 +372,7 @@ class ActionsMap(object):
|
||||||
except IOError:
|
except IOError:
|
||||||
self.use_cache = False
|
self.use_cache = False
|
||||||
actionsmaps = self.generate_cache(namespaces)
|
actionsmaps = self.generate_cache(namespaces)
|
||||||
elif n not in actionsmap:
|
elif n not in actionsmaps:
|
||||||
with open('%s/actionsmap/%s.yml' % (pkg.datadir, n)) as f:
|
with open('%s/actionsmap/%s.yml' % (pkg.datadir, n)) as f:
|
||||||
actionsmaps[n] = ordered_yaml_load(f)
|
actionsmaps[n] = ordered_yaml_load(f)
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ 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 argn, argp in arguments.items():
|
for argn, argp in arguments.items():
|
||||||
names = top_parser.format_arg_names(argn,
|
names = top_parser.format_arg_names(str(argn),
|
||||||
argp.pop('full', None))
|
argp.pop('full', None))
|
||||||
try: argp['type'] = eval(argp['type'])
|
try: argp['type'] = eval(argp['type'])
|
||||||
except: pass
|
except: pass
|
||||||
|
|
Loading…
Add table
Reference in a new issue