Module: check_mk
Branch: master
Commit: cab824626b4f2de041f0b616a071ba90baa9adf8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cab824626b4f2d…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jan 31 16:35:57 2018 +0100
Do not compare python-sorted numerations
Change-Id: Iba6780e5e9bc3eb72486d6248708c91bb2200627
---
lib/structured_data.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/structured_data.py b/lib/structured_data.py
index 451ef20..1527d55 100644
--- a/lib/structured_data.py
+++ b/lib/structured_data.py
@@ -741,7 +741,7 @@ class Numeration(Leaf):
new, changed, removed = 0, 0, 0
data = []
for my_entries, old_entries in \
- zip(sorted(self._numeration), sorted(old._numeration)):
+ zip(self._numeration, old._numeration):
new_entries, changed_entries, removed_entries, identical_entries = \
self._compare_entries(my_entries, old_entries)
new += len(new_entries)
@@ -818,6 +818,8 @@ class Numeration(Leaf):
data.append({k: (None,v) for k,v in entry.iteritems()})
elif mode == "removed":
data.append({k: (v,None) for k,v in entry.iteritems()})
+ else:
+ break
delta.set_child_data(data)
return delta