[megaclisas-status] some fixes

This commit is contained in:
Vincent S. Cojot 2015-11-05 12:55:08 -05:00
parent 99ba05aabd
commit 989d89d2cc
1 changed files with 2 additions and 2 deletions

View File

@ -191,14 +191,14 @@ def returnBBUStatus(output):
BBUStatus = ''
tmpstr = ''
for line in output:
if re.match(r'^Battery Replacement required +:.*$',line.strip()):
if re.match(r'^ *Battery Replacement required +:.*$',line.strip()):
tmpstr = line.split(':')[1].strip()
BBUStatus = re.sub(' +.*$', '', tmpstr)
break
if ( BBUStatus == 'Yes' ):
return str('REPL')
else:
return str(BBUStatus)
return str('Good')
def returnArrayNumber(output):
i = 0