Remove old imports from checks.py

This commit is contained in:
Alexis Métaireau 2023-10-17 23:50:34 +02:00
parent 2ad0bfab39
commit a97a57d06c

View file

@ -1,12 +1,12 @@
import ssl
import time
from datetime import datetime
from OpenSSL import crypto
from argos.checks.base import (BaseCheck, ExpectedIntValue,
ExpectedStringValue, Response, Severity, Status)
from argos.logging import logger
from argos.checks.base import (
BaseCheck,
ExpectedIntValue,
ExpectedStringValue,
Severity,
Status,
)
class HTTPStatus(BaseCheck):
@ -44,7 +44,7 @@ class SSLCertificateExpiration(BaseCheck):
if response.is_error:
raise
network_stream = ssl_object = response.extensions["network_stream"]
network_stream = response.extensions["network_stream"]
ssl_obj = network_stream.get_extra_info("ssl_object")
cert = ssl_obj.getpeercert()