Handle connection refused messages
This patch handle the connection refused messages. One of these messages is related to returned zeros.
This commit is contained in:
parent
81bd57e434
commit
48f2df4267
@ -677,6 +677,13 @@ class IMAPServer:
|
|||||||
"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,
|
OfflineImapError.ERROR.REPO,
|
||||||
exc_info()[2])
|
exc_info()[2])
|
||||||
|
elif e.args and \
|
||||||
|
e.args[0][:35] == 'IMAP4 protocol error: socket error:':
|
||||||
|
raise OfflineImapError(
|
||||||
|
"Could not connect to remote server '{}' "
|
||||||
|
"for repository '{}'. Connection Refused.".format(
|
||||||
|
self.hostname, self.repos),
|
||||||
|
OfflineImapError.ERROR.CRITICAL)
|
||||||
else:
|
else:
|
||||||
# re-raise all other errors
|
# re-raise all other errors
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user