Skip to content

Commit

Permalink
Merge pull request #83 from nobody43/disks_manual_list
Browse files Browse the repository at this point in the history
Fix manual disks list
  • Loading branch information
nobody43 authored May 4, 2024
2 parents f4b9796 + cc8c701 commit 7fe920d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mini_ipmi_smartctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# Manually provide disk list or RAID configuration if needed.
diskDevsManual = []
# like this:
#diskDevsManual = ['/dev/sda -d sat+megaraid,4', '/dev/sda -d sat+megaraid,5']
#diskDevsManual = ['/dev/bus/0 -d megaraid,4', '/dev/bus/0 -d megaraid,5']
# more info: https://www.smartmontools.org/wiki/Supported_RAID-Controllers

# These models will not produce 'NOTEMP' warning. Pull requests are welcome.
Expand Down Expand Up @@ -377,8 +377,12 @@ def doHeavyDebug(diskError_, driveStatus_, diskPout_):
scanErrors = listDisks_Out[0]
diskDevs = listDisks_Out[1]

scanErrorNotype = scanErrors[0]
scanErrorNvme = scanErrors[1]
if scanErrors:
scanErrorNotype = scanErrors[0]
scanErrorNvme = scanErrors[1]
else:
scanErrorNotype = None
scanErrorNvme = None

sessionSerials = []
allTemps = []
Expand Down

0 comments on commit 7fe920d

Please sign in to comment.