avoid processing bad mtab entries (#16206)
fixes #16174
(cherry picked from commit c376954ecf
)
This commit is contained in:
parent
553ceefe81
commit
e971a63c33
1 changed files with 2 additions and 0 deletions
|
@ -1139,6 +1139,8 @@ class LinuxHardware(Hardware):
|
|||
mtab = get_file_content('/etc/mtab', '')
|
||||
for line in mtab.split('\n'):
|
||||
fields = line.rstrip('\n').split()
|
||||
if len(fields) < 4:
|
||||
continue
|
||||
if fields[0].startswith('/') or ':/' in fields[0]:
|
||||
if(fields[2] != 'none'):
|
||||
size_total, size_available = self._get_mount_size_facts(fields[1])
|
||||
|
|
Loading…
Reference in a new issue