mirror of https://github.com/eLvErDe/hwraid.git
3ware-status: fail with IndexError if disk has no model type (uh?)
This commit is contained in:
parent
1cc125452a
commit
5514c5067a
|
@ -92,7 +92,11 @@ if not nagiosmode:
|
|||
print '-- ID | Model'
|
||||
for controller in controllerlist:
|
||||
cmd = binarypath+' info '+controller+' model'
|
||||
model = getOutput(cmd)[0].split(' = ')[1].strip()
|
||||
# https://github.com/eLvErDe/hwraid/issues/69
|
||||
try:
|
||||
model = getOutput(cmd)[0].split(' = ')[1].strip()
|
||||
except IndexError:
|
||||
model = 'N/A'
|
||||
print controller+' | '+model
|
||||
print ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue