Megaraid: handle disk without enclosure ID

This commit is contained in:
Adam Cécile (Le_Vert) 2013-12-14 14:44:22 +01:00
parent 2ed0b50812
commit ab29056206
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ def getOutput(cmd):
def returnDiskList(output):
lines = []
for line in output:
if re.match(r'^[a-z][0-9]+[a-z][0-9]+[a-z][0-9]+\s.*$',line.strip()):
if re.match(r'^[a-z][0-9]+[a-z][0-9\*]+[a-z][0-9]+\s.*$',line.strip()):
list = line.split()
# Let's hack... Some disk may report smart error after status
# Get theses errors, join them into one list item and place it

View File

@ -36,7 +36,7 @@ def getOutput(cmd):
def returnDiskList(output):
lines = []
for line in output:
if re.match(r'^[a-z][0-9]+[a-z][0-9]+[a-z][0-9]+\s.*$',line.strip()):
if re.match(r'^[a-z][0-9]+[a-z][0-9\*]+[a-z][0-9]+\s.*$',line.strip()):
list = line.split()
# Let's hack... Some disk may report smart error after status
# Get theses errors, join them into one list item and place it