Commit 742dd9cc authored by Jérome Perrin's avatar Jérome Perrin

It is wrong to compare keys, as ordering is unspecified. Use sorted instead



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42220 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 32fccea5
......@@ -67,7 +67,7 @@ class InventoryKey(UserDict):
def __cmp__(self, other):
# this is basically here so that we can see if two inventory keys are
# equals.
if tuple(self.keys()) != tuple(other.keys()):
if sorted(self.keys()) != sorted(other.keys()):
return -1
for k, v in self.items():
if v != other[k]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment