Skip to content

Cannot directly close dsch storage files #4

@JonasHoelscher

Description

@JonasHoelscher

If a dsch storage is created the file will be created and blocked as long as the storage object exists.
This is a problem when, for example, creating integration tests: When using dsch to create temporary files in a test environment, the temporary files cannot be removed afterwards.

Quick fix

storage = dsch.create(file, schema)
storage.save()
storage._storage.close()

This closes the file using the internal h5py object.
Therefore the user needs to be aware of the open file handlers which he didn't even open.

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