Merge pull request #34 from thekix/master

foldersort broken with instance comparison
This commit is contained in:
Rodolfo García Peñas (kix) 2020-12-30 21:52:42 +01:00 committed by GitHub
commit feeafa1d10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -720,6 +720,24 @@ class IMAPRepository(BaseRepository):
return mycmp(self.obj.getvisiblename(),
other.obj.getvisiblename())
def __lt__(self, other):
return self.__cmp__(other) < 0
def __le__(self, other):
return self.__cmp__(other) <= 0
def __gt__(self, other):
return self.__cmp__(other) > 0
def __ge__(self, other):
return self.__cmp__(other) >= 0
def __eq__(self, other):
return self.__cmp__(other) == 0
def __ne__(self, other):
return self.__cmp__(other) != 0
return K
retval.sort(key=cmp2key(self.foldersort))