From fea5500605e7785f1d048e0b1b7ac0e92cbb77cc Mon Sep 17 00:00:00 2001 From: Robin Roth Date: Tue, 22 Mar 2016 07:50:04 +0100 Subject: [PATCH] remove double read of "path" path is already read in line 444, don't reread the file here, but use the existing content --- lib/ansible/module_utils/facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 203a72996d1..c65d4a466df 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -466,7 +466,7 @@ class Facts(object): elif path == '/etc/SuSE-release': if 'open' in data.lower(): data = data.splitlines() - distdata = get_file_content(path).split('\n')[0] + distdata = data[0] self.facts['distribution'] = distdata.split()[0] for line in data: release = re.search('CODENAME *= *([^\n]+)', line)