Skip to content

Commit

Permalink
Don't check return status from smartctl -a
Browse files Browse the repository at this point in the history
Some device doesn't support SMART capability and getting information
from such device returns an error code 4. As it happens in CI we remove
the check of the return code.

Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed Dec 19, 2023
1 parent e9415e0 commit e6a4c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SOURCES/etc/xapi.d/plugins/smartctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_information(session, args):
with OperationLocker():
disks = _list_disks()
for disk in disks:
cmd = run_command(["smartctl", "-j", "-a", disk])
cmd = run_command(["smartctl", "-j", "-a", disk], check=False)
results[disk] = json.loads(cmd['stdout'])
return json.dumps(results)

Expand Down

0 comments on commit e6a4c8a

Please sign in to comment.