more style consistency
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
@ -22,11 +22,10 @@ from sys import exc_info
|
||||
from offlineimap import imaputil, OfflineImapError
|
||||
from offlineimap import imaplibutil
|
||||
import offlineimap.accounts
|
||||
|
||||
"""Folder implementation to support features of the Gmail IMAP server.
|
||||
"""
|
||||
from .IMAP import IMAPFolder
|
||||
|
||||
"""Folder implementation to support features of the Gmail IMAP server."""
|
||||
|
||||
class GmailFolder(IMAPFolder):
|
||||
"""Folder implementation to support features of the Gmail IMAP server.
|
||||
|
||||
@ -101,11 +100,11 @@ class GmailFolder(IMAPFolder):
|
||||
body = self.addmessageheader(body, '\n', self.labelsheader, labels_str)
|
||||
|
||||
if len(body)>200:
|
||||
dbg_output = "%s...%s" % (str(body)[:150], str(body)[-50:])
|
||||
dbg_output = "%s...%s"% (str(body)[:150], str(body)[-50:])
|
||||
else:
|
||||
dbg_output = body
|
||||
|
||||
self.ui.debug('imap', "Returned object from fetching %d: '%s'" %
|
||||
self.ui.debug('imap', "Returned object from fetching %d: '%s'"%
|
||||
(uid, dbg_output))
|
||||
return body
|
||||
|
||||
@ -139,7 +138,7 @@ class GmailFolder(IMAPFolder):
|
||||
# imaplib2 from quoting the sequence.
|
||||
#
|
||||
# NB: msgsToFetch are sequential numbers, not UID's
|
||||
res_type, response = imapobj.fetch("'%s'" % msgsToFetch,
|
||||
res_type, response = imapobj.fetch("'%s'"% msgsToFetch,
|
||||
'(FLAGS X-GM-LABELS UID)')
|
||||
if res_type != 'OK':
|
||||
raise OfflineImapError("FETCHING UIDs in folder [%s]%s failed. " % \
|
||||
|
Reference in New Issue
Block a user