-
Notifications
You must be signed in to change notification settings - Fork 141
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
Close session in worker_webhook function #1456
Conversation
There is a Packit service outage and therefore Packit tests have not been started yet. |
/packit test |
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
|
keylime/revocation_notifier.py
Outdated
@@ -159,6 +159,8 @@ def worker_webhook(tosend: Dict[str, Any], url: str) -> None: | |||
|
|||
time.sleep(next_retry) | |||
|
|||
session.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that a bit more correct fix is to use the context manager: https://requests.readthedocs.io/en/latest/user/advanced/#session-objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Resolves keylime#1455 Signed-off-by: Karel Srot <ksrot@redhat.com>
Signed-off-by: Karel Srot <ksrot@redhat.com>
1b4a240
to
47b7d0c
Compare
I have just merged two commits. |
Resolves #1455