Reformat offlineimap/imapserver.py
Add some spaces, remove lines,... now format is better (lintian).
This commit is contained in:
parent
20a9837e26
commit
b6a686e56f
@ -34,9 +34,9 @@ import offlineimap.accounts
|
||||
from offlineimap import imaplibutil, imaputil, threadutil, OfflineImapError
|
||||
from offlineimap.ui import getglobalui
|
||||
|
||||
|
||||
try:
|
||||
import gssapi
|
||||
|
||||
have_gss = True
|
||||
except ImportError:
|
||||
have_gss = False
|
||||
@ -333,22 +333,22 @@ class IMAPServer(object):
|
||||
"TLS connection: %s" % str(e),
|
||||
OfflineImapError.ERROR.REPO, None, exc_info()[2])
|
||||
|
||||
## All __authn_* procedures are helpers that do authentication.
|
||||
## They are class methods that take one parameter, IMAP object.
|
||||
##
|
||||
## Each function should return True if authentication was
|
||||
## successful and False if authentication wasn't even tried
|
||||
## for some reason (but not when IMAP has no such authentication
|
||||
## capability, calling code checks that).
|
||||
##
|
||||
## Functions can also raise exceptions; two types are special
|
||||
## and will be handled by the calling code:
|
||||
##
|
||||
## - imapobj.error means that there was some error that
|
||||
## comes from imaplib2;
|
||||
##
|
||||
## - OfflineImapError means that function detected some
|
||||
## problem by itself.
|
||||
# All __authn_* procedures are helpers that do authentication.
|
||||
# They are class methods that take one parameter, IMAP object.
|
||||
#
|
||||
# Each function should return True if authentication was
|
||||
# successful and False if authentication wasn't even tried
|
||||
# for some reason (but not when IMAP has no such authentication
|
||||
# capability, calling code checks that).
|
||||
#
|
||||
# Functions can also raise exceptions; two types are special
|
||||
# and will be handled by the calling code:
|
||||
#
|
||||
# - imapobj.error means that there was some error that
|
||||
# comes from imaplib2;
|
||||
#
|
||||
# - OfflineImapError means that function detected some
|
||||
# problem by itself.
|
||||
|
||||
def __authn_gssapi(self, imapobj):
|
||||
if not have_gss:
|
||||
@ -672,8 +672,7 @@ class IMAPServer(object):
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError(
|
||||
"Could not connect to remote server '%s' "
|
||||
"for repository '%s'. Remote does not answer."%
|
||||
(self.hostname, self.repos),
|
||||
"for repository '%s'. Remote does not answer." % (self.hostname, self.repos),
|
||||
OfflineImapError.ERROR.REPO),
|
||||
exc_info()[2])
|
||||
else:
|
||||
@ -751,7 +750,6 @@ class IMAPServer(object):
|
||||
self.ui.debug('imap', 'keepalive: event is set; exiting')
|
||||
return
|
||||
|
||||
|
||||
def releaseconnection(self, connection, drop_conn=False):
|
||||
"""Releases a connection, returning it to the pool.
|
||||
|
||||
@ -864,7 +862,6 @@ class IdleThread(object):
|
||||
else:
|
||||
self.parent.releaseconnection(imapobj)
|
||||
|
||||
|
||||
while not self.stop_sig.isSet():
|
||||
self.needsync = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user