Minor bugfix for Hot Spares display...

This commit is contained in:
Vincent S. Cojot 2017-04-04 14:46:30 -04:00
parent 5e9b42143f
commit d0800e4b94
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python
# $Id: megaclisas-status,v 1.70 2017/03/28 16:02:04 root Exp root $
# $Id: megaclisas-status,v 1.71 2017/04/04 18:45:52 root Exp root $
#
# Written by Adam Cecile <gandalf@NOSPAM.le-vert.net>
# Modified by Vincent S. Cojot <vincent@NOSPAM.cojot.name>
@ -175,6 +175,8 @@ def returnUnConfDriveNumber(output):
for line in output:
if re.match(r'^Firmware state: Unconfigured.*$',line.strip()):
confdrives += 1
if re.match(r'^Firmware state: Hotspare.*$',line.strip()):
confdrives += 1
return int(confdrives)
def returnControllerModel(output):