mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
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:
@@ -247,9 +247,9 @@ class NetworkConfig(object):
|
||||
updates = list()
|
||||
for index, line in enumerate(self.items):
|
||||
try:
|
||||
if line != other[index]:
|
||||
if str(line).strip() != str(other[index]).strip():
|
||||
updates.append(line)
|
||||
except IndexError:
|
||||
except (AttributeError, IndexError):
|
||||
updates.append(line)
|
||||
return updates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user