Reformat offlineimap/folder/IMAP.py
Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
parent
3d1360a7e3
commit
80ee751243
@ -509,12 +509,16 @@ class IMAPRepository(BaseRepository):
|
|||||||
def cmp2key(mycmp):
|
def cmp2key(mycmp):
|
||||||
"""Converts a cmp= function into a key= function
|
"""Converts a cmp= function into a key= function
|
||||||
We need to keep cmp functions for backward compatibility"""
|
We need to keep cmp functions for backward compatibility"""
|
||||||
|
|
||||||
class K(object):
|
class K(object):
|
||||||
def __init__(self, obj, *args):
|
def __init__(self, obj, *args):
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
|
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
return mycmp(self.obj.getvisiblename(), other.obj.getvisiblename())
|
return mycmp(self.obj.getvisiblename(), other.obj.getvisiblename())
|
||||||
|
|
||||||
return K
|
return K
|
||||||
|
|
||||||
retval.sort(key=cmp2key(self.foldersort))
|
retval.sort(key=cmp2key(self.foldersort))
|
||||||
|
|
||||||
self.folders = retval
|
self.folders = retval
|
||||||
@ -580,6 +584,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
finally:
|
finally:
|
||||||
self.imapserver.releaseconnection(imapobj)
|
self.imapserver.releaseconnection(imapobj)
|
||||||
|
|
||||||
|
|
||||||
class MappedIMAPRepository(IMAPRepository):
|
class MappedIMAPRepository(IMAPRepository):
|
||||||
def getfoldertype(self):
|
def getfoldertype(self):
|
||||||
return folder.UIDMaps.MappedIMAPFolder
|
return folder.UIDMaps.MappedIMAPFolder
|
||||||
|
Loading…
Reference in New Issue
Block a user