Commit ce41b023 by James Cammarata

Merge pull request #7887 from s0x/funtoo-gathering-facts

Check for empty os-release file, fixes #7885
parents 5d404620 f4fd9d36
......@@ -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':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment