Revert "[megaclisas-status] bug fix : properly detect unconfigured drives when they were previously part of an array"

This reverts commit 517b2d35cd.
This commit is contained in:
Adam Cecile 2016-02-10 12:31:51 +01:00
parent 5b030031b3
commit 530b024ab0
1 changed files with 1 additions and 4 deletions

View File

@ -151,12 +151,9 @@ def returnRebuildProgress(output):
def returnUnconfDriveNumber(output): def returnUnconfDriveNumber(output):
confdrives = 0 confdrives = 0
unconfdrives = 0 unconfdrives = 0
totaldrivenumber = 0
for line in output: for line in output:
if re.match(r'.*Number of PDs:.*$',line.strip()): if re.match(r'.*Number of PDs:.*$',line.strip()):
totaldrivenumber += int(line.split(':')[2].strip()) confdrives += int(line.split(':')[2].strip())
if re.match(r'^Firmware state:.*$',line.strip()):
confdrives += 1
unconfdrives = totaldrivenumber - confdrives unconfdrives = totaldrivenumber - confdrives
return int(unconfdrives) return int(unconfdrives)