Fix a problem when SSL fails
This commit is contained in:
parent
1c6f07a858
commit
1a0f36c233
|
@ -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
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue