Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

File handle not closed properly when uploading from path. #52

@Melanpan

Description

@Melanpan

Getting the warning ResourceWarning: unclosed file <_io.BufferedReader on Python 3.5.0.

fd = open(path, 'rb')
contents = fd.read()
b64 = base64.b64encode(contents)

fd isn't closed after uploading.

Metadata

Metadata

Assignees

No one assigned

    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