diff MoinMoin/items/__init__.py @ 1614:5b5e7190452f

Fix various registry Entry `__lt__` methods. This resolves issue #221.
author Cheer Xiao <xiaqqaix@gmail.com>
date Wed, 01 Aug 2012 00:21:41 +0800
parents bc8a2546468b
children 8f0a17a04e60 c6974ba2e2b2
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Wed Aug 01 00:21:03 2012 +0800
+++ b/MoinMoin/items/__init__.py	Wed Aug 01 00:21:41 2012 +0800
@@ -77,9 +77,9 @@
 
         def __lt__(self, other):
             if isinstance(other, self.__class__):
-                if self.priority < other.priority:
-                    return True
-                return self.itemtype == other.itemtype
+                if self.priority != other.priority:
+                    return self.priority < other.priority
+                return self.itemtype < other.itemtype
             return NotImplemented