[mod] more renaming

This commit is contained in:
Laurent Peuch 2017-07-23 03:15:12 +02:00
parent e851c76d6e
commit 1c8f387bae

View file

@ -610,22 +610,22 @@ class ActionsMap(object):
_global['arguments']) _global['arguments'])
# -- Parse categories # -- Parse categories
for cn, cp in actionsmap.items(): for category_name, category_values in actionsmap.items():
if "actions" not in cp: if "actions" not in category_values:
# 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, namespace) "namespace '%s'", category_name, namespace)
continue continue
actions = cp.pop('actions') actions = category_values.pop('actions')
# Get category parser # Get category parser
cat_parser = top_parser.add_category_parser(cn, **cp) cat_parser = top_parser.add_category_parser(category_name, **category_values)
# -- 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 = (namespace, cn, an) tid = (namespace, category_name, an)
if 'configuration' in ap: if 'configuration' in ap:
conf = ap.pop('configuration') conf = ap.pop('configuration')
@ -643,7 +643,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",
namespace, cn, an, e) namespace, category_name, an, e)
continue continue
# Store action identifier and add arguments # Store action identifier and add arguments