Reformat offlineimap/folder/IMAP.py
Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
parent
2f97dda6d9
commit
da1788db53
@ -27,7 +27,6 @@ from offlineimap import imaputil, imaplibutil, emailutil, OfflineImapError
|
||||
from offlineimap import globals
|
||||
from offlineimap.virtual_imaplib2 import MonthNames
|
||||
|
||||
|
||||
# Globals
|
||||
CRLF = '\r\n'
|
||||
MSGCOPY_NAMESPACE = 'MSGCOPY_'
|
||||
@ -263,7 +262,6 @@ class IMAPFolder(BaseFolder):
|
||||
def msglist_item_initializer(self, uid):
|
||||
return {'uid': uid, 'flags': set(), 'time': 0}
|
||||
|
||||
|
||||
# Interface from BaseFolder
|
||||
def cachemessagelist(self, min_date=None, min_uid=None):
|
||||
self.ui.loadmessagelist(self.repository, self)
|
||||
@ -286,7 +284,8 @@ class IMAPFolder(BaseFolder):
|
||||
if res_type != 'OK':
|
||||
raise OfflineImapError("FETCHING UIDs in folder [%s]%s failed. "
|
||||
"Server responded '[%s] %s'" % (self.getrepository(), self,
|
||||
res_type, response), OfflineImapError.ERROR.FOLDER)
|
||||
res_type, response),
|
||||
OfflineImapError.ERROR.FOLDER)
|
||||
finally:
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
||||
@ -378,7 +377,6 @@ class IMAPFolder(BaseFolder):
|
||||
headervalue += str(self.randomgenerator.randint(0, 9999999999))
|
||||
return (headername, headervalue)
|
||||
|
||||
|
||||
def __savemessage_searchforheader(self, imapobj, headername, headervalue):
|
||||
self.ui.debug('imap', '__savemessage_searchforheader called for %s: %s' %
|
||||
(headername, headervalue))
|
||||
@ -765,7 +763,6 @@ class IMAPFolder(BaseFolder):
|
||||
self.ui.debug('imap', 'savemessage: returning new UID %d' % uid)
|
||||
return uid
|
||||
|
||||
|
||||
def _fetch_from_imap(self, uids, retry_num=1):
|
||||
"""Fetches data from IMAP server.
|
||||
|
||||
@ -836,7 +833,6 @@ class IMAPFolder(BaseFolder):
|
||||
|
||||
return ndata
|
||||
|
||||
|
||||
def _store_to_imap(self, imapobj, uid, field, data):
|
||||
"""Stores data to IMAP server
|
||||
|
||||
@ -947,7 +943,6 @@ class IMAPFolder(BaseFolder):
|
||||
elif operation == '-':
|
||||
self.messagelist[uid]['flags'] -= flags
|
||||
|
||||
|
||||
def __processmessagesflags(self, operation, uidlist, flags):
|
||||
# Hack for those IMAP servers with a limited line length.
|
||||
batch_size = 100
|
||||
@ -956,7 +951,6 @@ class IMAPFolder(BaseFolder):
|
||||
uidlist[i:i + batch_size], flags)
|
||||
return
|
||||
|
||||
|
||||
# Interface from BaseFolder
|
||||
def change_message_uid(self, uid, new_uid):
|
||||
"""Change the message from existing uid to new_uid
|
||||
|
Loading…
Reference in New Issue
Block a user