[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 = '' BBUStatus = ''
tmpstr = '' tmpstr = ''
for line in output: 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() tmpstr = line.split(':')[1].strip()
BBUStatus = re.sub(' +.*$', '', tmpstr) BBUStatus = re.sub(' +.*$', '', tmpstr)
break break
if ( BBUStatus == 'Yes' ): if ( BBUStatus == 'Yes' ):
return str('REPL') return str('REPL')
else: else:
return str(BBUStatus) return str('Good')
def returnArrayNumber(output): def returnArrayNumber(output):
i = 0 i = 0