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):
|
||||
"""Converts a cmp= function into a key= function
|
||||
We need to keep cmp functions for backward compatibility"""
|
||||
|
||||
class K(object):
|
||||
def __init__(self, obj, *args):
|
||||
self.obj = obj
|
||||
|
||||
def __cmp__(self, other):
|
||||
return mycmp(self.obj.getvisiblename(), other.obj.getvisiblename())
|
||||
|
||||
return K
|
||||
|
||||
retval.sort(key=cmp2key(self.foldersort))
|
||||
|
||||
self.folders = retval
|
||||
@ -580,6 +584,7 @@ class IMAPRepository(BaseRepository):
|
||||
finally:
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
||||
|
||||
class MappedIMAPRepository(IMAPRepository):
|
||||
def getfoldertype(self):
|
||||
return folder.UIDMaps.MappedIMAPFolder
|
||||
|
Loading…
Reference in New Issue
Block a user