Skip to content

Resource Warning - unclosed SSL #3748

Answered by tim-finnigan
rickerish-nah asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rickerish-nah there is an example here in that issue you linked of wrapping the s3 client with the closing context manager:

from contextmanager import closing
with closing(boto3.client(service_name='s3')) as client:
    buckets = client.list_buckets()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RyanFitzSimmonsAK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants