add the repository name when connecting

Otherwise, it might be impossible to know which account is connecting when more
than one is syncing.

Code style.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht
2016-07-29 05:25:06 +02:00
parent 9aa5afa951
commit 203c28f21f
5 changed files with 27 additions and 18 deletions

View File

@ -484,7 +484,8 @@ class IMAPServer(object):
while success is not True:
# Generate a new connection.
if self.tunnel:
self.ui.connecting('tunnel', self.tunnel)
self.ui.connecting(
self.repos.getname(), 'tunnel', self.tunnel)
imapobj = imaplibutil.IMAP4_Tunnel(
self.tunnel,
timeout=socket.getdefaulttimeout(),
@ -492,7 +493,8 @@ class IMAPServer(object):
)
success = True
elif self.usessl:
self.ui.connecting(self.hostname, self.port)
self.ui.connecting(
self.repos.getname(), self.hostname, self.port)
imapobj = imaplibutil.WrappedIMAP4_SSL(
host=self.hostname,
port=self.port,
@ -508,7 +510,8 @@ class IMAPServer(object):
af=self.af,
)
else:
self.ui.connecting(self.hostname, self.port)
self.ui.connecting(
self.repos.getname(), self.hostname, self.port)
imapobj = imaplibutil.WrappedIMAP4(
self.hostname, self.port,
timeout=socket.getdefaulttimeout(),