fixes minor issue with strict diff of network config (#21436)

strips leading and trailing spaces for line comparision to prevent
fails positiives
pull/20366/merge
Peter Sprygada 8 years ago committed by GitHub
parent 8e4f0ec162
commit 47141b8426

@ -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…
Cancel
Save