Fix inventory crash on nvme binary too old or absent #170

Merged
cyrinux merged 2 commits from fix_nvme_crash into master 2020-10-14 12:40:20 +02:00
Showing only changes of commit 6a19fc67f2 - Show all commits

View file

@ -88,6 +88,9 @@ class LSHW():
self.disks.append(d)
elif "nvme" in obj["configuration"]["driver"]:
if not is_tool('nvme'):
logging.error('nvme-cli >= 1.0 does not seem to be installed')
else:
try:
nvme = json.loads(
subprocess.check_output(