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:
Peter Sprygada 2017-02-14 20:12:49 -05:00 committed by GitHub
parent 8e4f0ec162
commit 47141b8426

View file

@ -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