Skip to content

Ensure we close the opened netCDF file in gmt_nc_is_cube#4777

Merged
PaulWessel merged 2 commits into
masterfrom
close-ncfile
Feb 9, 2021
Merged

Ensure we close the opened netCDF file in gmt_nc_is_cube#4777
PaulWessel merged 2 commits into
masterfrom
close-ncfile

Conversation

@PaulWessel

Copy link
Copy Markdown
Member

The (new) gmt_nc_is_cube function prematurely returned without closing the door. Closes #4745.

@PaulWessel PaulWessel added this to the 6.2.0 milestone Feb 9, 2021
@PaulWessel PaulWessel self-assigned this Feb 9, 2021
@PaulWessel

Copy link
Copy Markdown
Member Author

OK, well, alla tests pass as before and the only real difference is in gmt_nc_is_cube which now simply closes a file. So I think a harmless PR that will solve your problem once in master. Perhaps just approve.

@seisman

seisman commented Feb 9, 2021

Copy link
Copy Markdown
Member

I just realize that I can test it in PR #4745. Will report back in < 30 minutes.

@joa-quim joa-quim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Confirmed that it works. Uf.

@PaulWessel

Copy link
Copy Markdown
Member Author

Did this do the trick, @seisman ?

@seisman

seisman commented Feb 10, 2021

Copy link
Copy Markdown
Member

It works for the simple tests in PR #4745, but I need to wait for conda-forge to run the full PyGMT tests.

@PaulWessel

Copy link
Copy Markdown
Member Author

OK, I assume that will work fine since we clearly fixed the bug with the missing close. But post if any surprises are found.

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.

3 participants