diff MoinMoin/items/content.py @ 1826:8231bca193ef

Demote priority in registry entries so that it is only compared when other fields are equal.
author Cheer Xiao <xiaqqaix@gmail.com>
date Thu, 04 Oct 2012 00:13:22 +0800
parents 38632887ca57
children ff503e7ea7a0 7946089b94f4 a1edfcdddd34
line wrap: on
line diff
--- a/MoinMoin/items/content.py	Mon Oct 01 23:38:17 2012 +0800
+++ b/MoinMoin/items/content.py	Thu Oct 04 00:13:22 2012 +0800
@@ -82,10 +82,10 @@
 
         def __lt__(self, other):
             if isinstance(other, self.__class__):
+                if self.content_type != other.content_type:
+                    return other.content_type.issupertype(self.content_type)
                 if self.priority != other.priority:
                     return self.priority < other.priority
-                if self.content_type != other.content_type:
-                    return other.content_type.issupertype(self.content_type)
                 return False
             return NotImplemented