mirror of https://github.com/eLvErDe/hwraid.git
[megaclisas-status] some fixes
This commit is contained in:
parent
99ba05aabd
commit
989d89d2cc
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue