fixes minor issue with strict diff of network config (#21436)
strips leading and trailing spaces for line comparision to prevent fails positiives
This commit is contained in:
parent
8e4f0ec162
commit
47141b8426
1 changed files with 2 additions and 2 deletions
|
@ -247,9 +247,9 @@ class NetworkConfig(object):
|
||||||
updates = list()
|
updates = list()
|
||||||
for index, line in enumerate(self.items):
|
for index, line in enumerate(self.items):
|
||||||
try:
|
try:
|
||||||
if line != other[index]:
|
if str(line).strip() != str(other[index]).strip():
|
||||||
updates.append(line)
|
updates.append(line)
|
||||||
except IndexError:
|
except (AttributeError, IndexError):
|
||||||
updates.append(line)
|
updates.append(line)
|
||||||
return updates
|
return updates
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue