Skip to content

Recurring /scratch disk fill: container holding deleted files open #42

@QSparks

Description

@QSparks

See Redmine issue 2377

Problem code

Using with NamedTemporaryFile leaves behind deleted-but-open files. To fix, we should handle the cleanup manually.

with NamedTemporaryFile(dir=outdir, delete=False) as outpath:
   try:
    #...
    finally:
        os.remove(outpath.name)

Metadata

Metadata

Assignees

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