Avoid crash when no disks are connected
* It was attempting to recheck the NVMe/SMART data for the fake N/A lines
This commit is contained in:
parent
52e3e24a3a
commit
e089dd99a3
1 changed files with 3 additions and 1 deletions
|
|
@ -1012,7 +1012,9 @@ def run_hw_tests(state):
|
||||||
# Recheck attributes
|
# Recheck attributes
|
||||||
if state.tests['NVMe / SMART']['Enabled']:
|
if state.tests['NVMe / SMART']['Enabled']:
|
||||||
for test_obj in state.tests['NVMe / SMART']['Objects']:
|
for test_obj in state.tests['NVMe / SMART']['Objects']:
|
||||||
run_nvme_smart_tests(state, test_obj, update_mode=True)
|
if test_obj.dev is not None:
|
||||||
|
# dev == None for the 'N/A' lines set above
|
||||||
|
run_nvme_smart_tests(state, test_obj, update_mode=True)
|
||||||
|
|
||||||
except GenericAbort:
|
except GenericAbort:
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue