Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #2790
hmpf opened this issue Feb 29, 2024 · 0 comments · May be fixed by #2903
Open
Tracked by #2790

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

hmpf opened this issue Feb 29, 2024 · 0 comments · May be fixed by #2903
Assignees

Comments

@hmpf
Copy link
Contributor

hmpf commented Feb 29, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants