Fix inventory crash on nvme binary too old or absent #170
1 changed files with 20 additions and 17 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue