Avoid crash when getting NVMe attributes

This commit is contained in:
2Shirt 2020-01-22 11:20:39 -07:00
parent 710fcc29dc
commit 79abbcfaf8
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -539,7 +539,7 @@ class Disk(BaseObj):
'raw': int(value),
'raw_str': str(value),
}
except ValueError:
except (TypeError, ValueError):
# Ignoring invalid attribute
LOG.error('Invalid NVMe attribute: %s %s', name, value)
elif KEY_SMART in self.smartctl: