mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Merge pull request #15086 from robinro/patch-2
remove double read of "path" (/etc/SuSE-release) in facts.py
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user