Skip to content

single.py - ResourceWarning: unclosed file #1688

Open
@gunlock

Description

@gunlock

Running single.py outputs a resource warning (ResourceWarning: unclosed file). The warning is due to calling os.popen() and not closing the returned file object.

The fix is to wrap the os.popen() calls in a with statement.

This fix has been tested on Linux and resolves the warning.

See #1689 fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions