mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-23 02:08:47 +02:00
Fix bug in preprocessing when wrapped line is appended to a non-existing entry. (#177)
This commit is contained in:
parent
2b8c66b983
commit
42ea132d60
2 changed files with 4 additions and 2 deletions
|
@ -391,7 +391,7 @@ class Interfaces(FactsBase):
|
|||
for line in data.split('\n'):
|
||||
if len(line) == 0 or line[:5] == 'Flags':
|
||||
continue
|
||||
elif not re.match(self.WRAPPED_LINE_RE, line):
|
||||
elif not preprocessed or not re.match(self.WRAPPED_LINE_RE, line):
|
||||
preprocessed.append(line)
|
||||
else:
|
||||
preprocessed[-1] += line
|
||||
|
@ -468,7 +468,7 @@ class Routing(FactsBase):
|
|||
for line in data.split('\n'):
|
||||
if len(line) == 0 or line[:5] == 'Flags':
|
||||
continue
|
||||
elif not re.match(self.WRAPPED_LINE_RE, line):
|
||||
elif not preprocessed or not re.match(self.WRAPPED_LINE_RE, line):
|
||||
preprocessed.append(line)
|
||||
else:
|
||||
preprocessed[-1] += line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue