mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] renaming + comment
This commit is contained in:
parent
173fa202ad
commit
4fd3b962aa
1 changed files with 10 additions and 5 deletions
|
@ -589,8 +589,13 @@ class ActionsMap(object):
|
||||||
# Instantiate parser
|
# Instantiate parser
|
||||||
top_parser = self.parser_class(**kwargs)
|
top_parser = self.parser_class(**kwargs)
|
||||||
|
|
||||||
# Iterate over actions map namespaces
|
# namespace, actionsmap is a tuple where:
|
||||||
for n, actionsmap in actionsmaps.items():
|
#
|
||||||
|
# * namespace define the top "name", for us it will always be
|
||||||
|
# "yunohost" and there well be only this one
|
||||||
|
# * actionsmap is the actual actionsmap that we care about
|
||||||
|
for namespace, actionsmap in actionsmaps.items():
|
||||||
|
print "n>>>", namespace
|
||||||
# Retrieve global parameters
|
# Retrieve global parameters
|
||||||
_global = actionsmap.pop('_global', {})
|
_global = actionsmap.pop('_global', {})
|
||||||
|
|
||||||
|
@ -610,7 +615,7 @@ class ActionsMap(object):
|
||||||
if "actions" not in cp:
|
if "actions" not in cp:
|
||||||
# Invalid category without actions
|
# Invalid category without actions
|
||||||
logger.warning("no actions found in category '%s' in "
|
logger.warning("no actions found in category '%s' in "
|
||||||
"namespace '%s'", cn, n)
|
"namespace '%s'", cn, namespace)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
actions = cp.pop('actions')
|
actions = cp.pop('actions')
|
||||||
|
@ -621,7 +626,7 @@ class ActionsMap(object):
|
||||||
# -- Parse actions
|
# -- Parse actions
|
||||||
for an, ap in actions.items():
|
for an, ap in actions.items():
|
||||||
args = ap.pop('arguments', {})
|
args = ap.pop('arguments', {})
|
||||||
tid = (n, cn, an)
|
tid = (namespace, cn, an)
|
||||||
|
|
||||||
if 'configuration' in ap:
|
if 'configuration' in ap:
|
||||||
conf = ap.pop('configuration')
|
conf = ap.pop('configuration')
|
||||||
|
@ -639,7 +644,7 @@ class ActionsMap(object):
|
||||||
continue
|
continue
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
logger.warning("cannot add action (%s, %s, %s): %s",
|
logger.warning("cannot add action (%s, %s, %s): %s",
|
||||||
n, cn, an, e)
|
namespace, cn, an, e)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Store action identifier and add arguments
|
# Store action identifier and add arguments
|
||||||
|
|
Loading…
Add table
Reference in a new issue