bug fix in netcfg replace method to handle whitespace argument

This commit is contained in:
Peter Sprygada 2016-06-22 09:29:12 -05:00
parent 54db1df244
commit 6b8c24e0f8

View file

@ -317,7 +317,9 @@ class NetworkConfig(object):
for item in self.items:
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 item.text != replace:
if parents == [p.text for p in item.parents]: