Fix get_dns_facts on inexistent resolv.conf

This commit is contained in:
ghislainbourgeois 2015-11-09 15:02:03 -05:00
parent e36b4e2a13
commit eb850d7e5b

View file

@ -727,7 +727,7 @@ class Facts(object):
def get_dns_facts(self):
self.facts['dns'] = {}
for line in get_file_lines('/etc/resolv.conf'):
for line in get_file_content('/etc/resolv.conf', '').splitlines():
if line.startswith('#') or line.startswith(';') or line.strip() == '':
continue
tokens = line.split()