IMAP.py long lines style
This patch changes long lines (>80 chars) to lines <80 chars. The patch only changes the style.
This commit is contained in:
parent
5033340c2f
commit
2f2f4ef918
@ -107,9 +107,9 @@ class IMAPRepository(BaseRepository):
|
|||||||
|
|
||||||
This requires that self.imapserver has been initialized with an
|
This requires that self.imapserver has been initialized with an
|
||||||
acquireconnection() or it will still be `None`"""
|
acquireconnection() or it will still be `None`"""
|
||||||
assert self.imapserver.delim is not None, "'%s' " \
|
assert self.imapserver.delim is not None, \
|
||||||
"repository called getsep() before the folder separator was " \
|
"'%s' repository called getsep() before the folder separator was " \
|
||||||
"queried from the server" % self
|
"queried from the server" % self
|
||||||
return self.imapserver.delim
|
return self.imapserver.delim
|
||||||
|
|
||||||
def gethost(self):
|
def gethost(self):
|
||||||
@ -141,7 +141,8 @@ class IMAPRepository(BaseRepository):
|
|||||||
|
|
||||||
# No success.
|
# No success.
|
||||||
raise OfflineImapError("No remote host for repository "
|
raise OfflineImapError("No remote host for repository "
|
||||||
"'%s' specified." % self, OfflineImapError.ERROR.REPO)
|
"'%s' specified." % self,
|
||||||
|
OfflineImapError.ERROR.REPO)
|
||||||
|
|
||||||
def get_remote_identity(self):
|
def get_remote_identity(self):
|
||||||
"""Remote identity is used for certain SASL mechanisms
|
"""Remote identity is used for certain SASL mechanisms
|
||||||
@ -167,8 +168,8 @@ class IMAPRepository(BaseRepository):
|
|||||||
for m in mechs:
|
for m in mechs:
|
||||||
if m not in supported:
|
if m not in supported:
|
||||||
raise OfflineImapError("Repository %s: " % self +
|
raise OfflineImapError("Repository %s: " % self +
|
||||||
"unknown authentication mechanism '%s'" % m,
|
"unknown authentication mechanism '%s'"
|
||||||
OfflineImapError.ERROR.REPO)
|
% m, OfflineImapError.ERROR.REPO)
|
||||||
|
|
||||||
self.ui.debug('imap', "Using authentication mechanisms %s" % mechs)
|
self.ui.debug('imap', "Using authentication mechanisms %s" % mechs)
|
||||||
return mechs
|
return mechs
|
||||||
@ -486,7 +487,8 @@ class IMAPRepository(BaseRepository):
|
|||||||
try:
|
try:
|
||||||
for foldername in self.folderincludes:
|
for foldername in self.folderincludes:
|
||||||
try:
|
try:
|
||||||
imapobj.select(imaputil.utf8_IMAP(foldername), readonly=True)
|
imapobj.select(imaputil.utf8_IMAP(foldername),
|
||||||
|
readonly=True)
|
||||||
except OfflineImapError as e:
|
except OfflineImapError as e:
|
||||||
# couldn't select this folderinclude, so ignore folder.
|
# couldn't select this folderinclude, so ignore folder.
|
||||||
if e.severity > OfflineImapError.ERROR.FOLDER:
|
if e.severity > OfflineImapError.ERROR.FOLDER:
|
||||||
@ -514,7 +516,8 @@ class IMAPRepository(BaseRepository):
|
|||||||
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
|
||||||
|
|
||||||
@ -532,9 +535,9 @@ class IMAPRepository(BaseRepository):
|
|||||||
try:
|
try:
|
||||||
result = imapobj.delete(foldername)
|
result = imapobj.delete(foldername)
|
||||||
if result[0] != 'OK':
|
if result[0] != 'OK':
|
||||||
raise OfflineImapError("Folder '%s'[%s] could not be deleted. "
|
msg = "Folder '%s'[%s] could not be deleted. "\
|
||||||
"Server responded: %s" % (foldername, self, str(result)),
|
"Server responded: %s" % (foldername, self, str(result))
|
||||||
OfflineImapError.ERROR.FOLDER)
|
raise OfflineImapError(msg, OfflineImapError.ERROR.FOLDER)
|
||||||
finally:
|
finally:
|
||||||
self.imapserver.releaseconnection(imapobj)
|
self.imapserver.releaseconnection(imapobj)
|
||||||
|
|
||||||
@ -577,9 +580,9 @@ class IMAPRepository(BaseRepository):
|
|||||||
|
|
||||||
result = imapobj.create(foldername)
|
result = imapobj.create(foldername)
|
||||||
if result[0] != 'OK':
|
if result[0] != 'OK':
|
||||||
raise OfflineImapError("Folder '%s'[%s] could not be created. "
|
msg = "Folder '%s'[%s] could not be created. "\
|
||||||
"Server responded: %s" % (foldername, self, str(result)),
|
"Server responded: %s" % (foldername, self, str(result))
|
||||||
OfflineImapError.ERROR.FOLDER)
|
raise OfflineImapError(msg, OfflineImapError.ERROR.FOLDER)
|
||||||
finally:
|
finally:
|
||||||
self.imapserver.releaseconnection(imapobj)
|
self.imapserver.releaseconnection(imapobj)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user