From a1e2f1bf730a5535c6bbb4de4ea7e83194556af9 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 14 Sep 2018 16:39:41 +0200 Subject: [PATCH] [voss_facts] remove uneeded global declaration of variable warnings (#45653) Since the variable is used only once, no need to declare it global. Remove a warning from linter (lgtm.com) --- lib/ansible/modules/network/voss/voss_facts.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/voss/voss_facts.py b/lib/ansible/modules/network/voss/voss_facts.py index e4266bc9cf..168b322870 100644 --- a/lib/ansible/modules/network/voss/voss_facts.py +++ b/lib/ansible/modules/network/voss/voss_facts.py @@ -441,9 +441,6 @@ FACT_SUBSETS = dict( VALID_SUBSETS = frozenset(FACT_SUBSETS.keys()) -global warnings -warnings = list() - def main(): """main entry point for module execution @@ -504,6 +501,7 @@ def main(): key = 'ansible_net_%s' % key ansible_facts[key] = value + warnings = list() check_args(module, warnings) module.exit_json(ansible_facts=ansible_facts, warnings=warnings)