Revert "Avoid crash during SMART self-test"
This reverts commit cc8c0992f6.
This commit is contained in:
parent
c8f95d866a
commit
dc6dcfb845
1 changed files with 1 additions and 5 deletions
|
|
@ -368,13 +368,9 @@ class Disk(BaseObj):
|
||||||
try:
|
try:
|
||||||
details = self.smartctl['ata_smart_data']['self_test']
|
details = self.smartctl['ata_smart_data']['self_test']
|
||||||
except (KeyError, TypeError):
|
except (KeyError, TypeError):
|
||||||
# Assuming disk lacks SMART support, ignore and return nearly empty dict.
|
# Assuming disk lacks SMART support, ignore and return empty dict.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Ensure status is present even if empty
|
|
||||||
if 'status' not in details:
|
|
||||||
details['status'] = {}
|
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
return details
|
return details
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue