From af616fe15ea8f1eb6b13fdaf5989ff732a590436 Mon Sep 17 00:00:00 2001 From: Richard C Isaacson Date: Tue, 25 Feb 2014 14:59:06 -0600 Subject: [PATCH] Rename flatten funciton. flatten(x) is used a lot in the various lookup plugins where in each it is slightly different. This is to make this name slightly more unique. --- lib/ansible/runner/lookup_plugins/dict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/lookup_plugins/dict.py b/lib/ansible/runner/lookup_plugins/dict.py index b2d8ad14dcb..cda15465987 100644 --- a/lib/ansible/runner/lookup_plugins/dict.py +++ b/lib/ansible/runner/lookup_plugins/dict.py @@ -19,7 +19,7 @@ from ansible.utils import safe_eval import ansible.utils as utils import ansible.errors as errors -def flatten(terms): +def flatten_hash_to_list(terms): ret = [] for key in terms: ret.append({'key': key, 'value': terms[key]}) @@ -36,4 +36,4 @@ class LookupModule(object): if not isinstance(terms, dict): raise errors.AnsibleError("with_dict expects a dict") - return flatten(terms) + return flatten_hash_to_list(terms)