provide more details in error message when SSL fails on non-standard port

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2017-06-30 05:10:14 +02:00
parent cf01d8e0eb
commit 90244b7fa6

View File

@ -619,7 +619,8 @@ class IMAPServer(object):
if self.port != 993:
reason = "Could not connect via SSL to host '%s' and non-s"\
"tandard ssl port %d configured. Make sure you connect"\
" to the correct port."% (self.hostname, self.port)
" to the correct port. Got: %s"%
(self.hostname, self.port, e)
else:
reason = "Unknown SSL protocol connecting to host '%s' for "\
"repository '%s'. OpenSSL responded:\n%s"\