Ignore swap or altroot entries

This commit is contained in:
Landry Breuil 2014-10-28 10:04:59 +01:00
parent d68eb7272e
commit 792d8d1808

View file

@ -948,6 +948,8 @@ class OpenBSDHardware(Hardware):
if line.startswith('#') or line.strip() == '': if line.startswith('#') or line.strip() == '':
continue continue
fields = re.sub(r'\s+',' ',line.rstrip('\n')).split() fields = re.sub(r'\s+',' ',line.rstrip('\n')).split()
if fields[1] == 'none' or fields[3] == 'xx':
continue
self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]}) self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
def get_memory_facts(self): def get_memory_facts(self):