Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in DDH5Writer.__exit__ #382

Merged

Conversation

yoshi74ls181
Copy link
Contributor

Currently, if an exception is raised inside a with DDH5Writer block before any data is added, DDH5Writer.__exit__ tries to add a metadata to the ddh5 file and fails because the ddh5 file doesn't have a group named data yet.
This pull request fixes this bug by creating a group named data if it doesn't exist.

Copy link
Collaborator

@marcosfrenkel marcosfrenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@marcosfrenkel marcosfrenkel merged commit 262d2bc into toolsforexperiments:master Feb 24, 2023
@yoshi74ls181 yoshi74ls181 deleted the fix-ddh5writer-exit branch February 25, 2023 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants