mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
new match(block). It previously only occurred if a new match occurred, but suggest it should occur when an end of a block match is found.
This commit is contained in:
parent
747bea9a27
commit
7553c42e09
1 changed files with 1 additions and 2 deletions
|
@ -112,8 +112,6 @@ def parse_cli(output, tmpl):
|
||||||
match_end = end_block.match(line)
|
match_end = end_block.match(line)
|
||||||
|
|
||||||
if match_start:
|
if match_start:
|
||||||
if lines:
|
|
||||||
blocks.append('\n'.join(lines))
|
|
||||||
lines = list()
|
lines = list()
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
block_started = True
|
block_started = True
|
||||||
|
@ -121,6 +119,7 @@ def parse_cli(output, tmpl):
|
||||||
elif match_end:
|
elif match_end:
|
||||||
if lines:
|
if lines:
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
blocks.append('\n'.join(lines))
|
||||||
block_started = False
|
block_started = False
|
||||||
|
|
||||||
elif block_started:
|
elif block_started:
|
||||||
|
|
Loading…
Reference in a new issue