Fix a problem when SSL fails

This commit is contained in:
Scott Wallace 2020-09-25 09:27:36 +01:00
parent 1c6f07a858
commit 1a0f36c233
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,6 @@
maubot: 0.1.0 maubot: 0.1.0
id: sh.wallace.matrix.shameotron id: sh.wallace.matrix.shameotron
version: 0.0.13 version: 0.0.14
license: MIT license: MIT
modules: modules:
- shameotron - shameotron

View file

@ -99,6 +99,7 @@ class ShameOTron(Plugin):
# parse the string from the certificate into a Python datetime object # parse the string from the certificate into a Python datetime object
return datetime.strptime(ssl_info['notAfter'], ssl_date_fmt) return datetime.strptime(ssl_info['notAfter'], ssl_date_fmt)
async def query_homeserver(self, host): async def query_homeserver(self, host):
""" """
Class method to query the Federation Tester to retrieve the running Class method to query the Federation Tester to retrieve the running
@ -130,7 +131,7 @@ class ShameOTron(Plugin):
ssl.SSLError, ssl.SSLError,
IndexError IndexError
) as error: ) as error:
self.log.warning('SSL error for: %s (%s): %s', host, addr, error) self.log.warning('SSL error for: %s: %s', host, error)
ssl_expiry = None ssl_expiry = None
try: try: