fix: ignore some more hp controllers errors while parsing
This commit is contained in:
parent
f7cdd92fa3
commit
9b06584fed
1 changed files with 7 additions and 2 deletions
|
@ -36,9 +36,14 @@ def ssacli(sub_command):
|
||||||
def _parse_ctrl_output(lines):
|
def _parse_ctrl_output(lines):
|
||||||
controllers = {}
|
controllers = {}
|
||||||
current_ctrl = None
|
current_ctrl = None
|
||||||
|
ignore_patterns = ['Note:', 'Error:', 'is not loaded', 'README']
|
||||||
|
ignore_match = False
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if not line or line.startswith('Note:'):
|
for pattern in ignore_patterns:
|
||||||
|
if not line or pattern in line:
|
||||||
|
ignore_match = True
|
||||||
|
break
|
||||||
|
if ignore_match:
|
||||||
continue
|
continue
|
||||||
ctrl = REGEXP_CONTROLLER_HP.search(line)
|
ctrl = REGEXP_CONTROLLER_HP.search(line)
|
||||||
if ctrl is not None:
|
if ctrl is not None:
|
||||||
|
|
Loading…
Reference in a new issue