mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Check for empty os-release file, fixes #7885
This commit is contained in:
@@ -266,7 +266,7 @@ class Facts(object):
|
||||
self.facts['distribution_release'] = dist[2] or 'NA'
|
||||
# Try to handle the exceptions now ...
|
||||
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':
|
||||
pass
|
||||
elif name == 'RedHat':
|
||||
|
||||
Reference in New Issue
Block a user