Skip to content

Possibly update AbstractChecker.run() in nav/statemon/abstractchecker.py to newer Python #2839

@hmpf

Description

@hmpf

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions