mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #7887 from s0x/funtoo-gathering-facts
Check for empty os-release file, fixes #7885
This commit is contained in:
commit
ce41b02300
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ class Facts(object):
|
||||||
self.facts['distribution_release'] = dist[2] or 'NA'
|
self.facts['distribution_release'] = dist[2] or 'NA'
|
||||||
# Try to handle the exceptions now ...
|
# Try to handle the exceptions now ...
|
||||||
for (path, name) in Facts.OSDIST_DICT.items():
|
for (path, name) in Facts.OSDIST_DICT.items():
|
||||||
if os.path.exists(path):
|
if os.path.exists(path) and os.path.getsize(path) > 0:
|
||||||
if self.facts['distribution'] == 'Fedora':
|
if self.facts['distribution'] == 'Fedora':
|
||||||
pass
|
pass
|
||||||
elif name == 'RedHat':
|
elif name == 'RedHat':
|
||||||
|
|
Loading…
Reference in a new issue