We no longer support Pythons older than 3.7 so the code below needs a second look:
if status == event.Event.UP:
# Dirty hack to check if we timed out...
# this is needed as ssl-socket calls may hang
# in python < 2.3
if self.response_time > 2 * self.timeout:
_logger.info(
"Adjusting status due to high responsetime (%s, " "%s)",
service,
self.response_time,
)
status = event.Event.DOWN
self.response_time = 2 * self.timeout
We no longer support Pythons older than 3.7 so the code below needs a second look: