mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
bug fix in netcfg replace method to handle whitespace argument
This commit is contained in:
parent
54db1df244
commit
6b8c24e0f8
1 changed files with 3 additions and 1 deletions
|
@ -317,7 +317,9 @@ class NetworkConfig(object):
|
||||||
|
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
for regexp in patterns:
|
for regexp in patterns:
|
||||||
string = ignore_whitespace is True and item.text or item.raw
|
string = item.raw
|
||||||
|
if ignore_whitespace is True:
|
||||||
|
string = item.text
|
||||||
if regexp.search(item.text):
|
if regexp.search(item.text):
|
||||||
if item.text != replace:
|
if item.text != replace:
|
||||||
if parents == [p.text for p in item.parents]:
|
if parents == [p.text for p in item.parents]:
|
||||||
|
|
Loading…
Reference in a new issue