diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py index 699f0c9..b732243 100644 --- a/offlineimap/repository/IMAP.py +++ b/offlineimap/repository/IMAP.py @@ -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))