提交 137197b9 编写于 作者: P Paul Tremberth

Prevent empty warnings in case of certificate verification failures

Fixes #1976
上级 6aa85aee
......@@ -44,7 +44,9 @@ try:
try:
verifyHostname(connection, self._hostnameASCII)
except VerificationError as e:
logger.warning(e)
logger.warning(
'Remote certificate is not valid for hostname "{}"; {}'.format(
self._hostnameASCII, e))
except ImportError:
# ImportError should not matter for older Twisted versions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册