Skip to content

Conversation

@rosemary-mantell-cresset
Copy link
Contributor

Change out of temporary directory before raising an exception that
causes the directory to be deleted as the context manager exits. If not
done, a PermissionError is raised repeatedly on Windows and the
message from the original exception is very difficult to read. This
behaviour was observed for the parmchk2 command, but the fix has also
been applied to the antechamber command.

This fix could also have been implemented using try/finally - I can redo it with that if you prefer.

Change out of temporary directory before raising an exception that
causes the directory to be deleted as the context manager exits. If not
done, a PermissionError is raised repeatedly on Windows and the
message from the original exception is very difficult to read. This
behaviour was observed for the parmchk2 command, but the fix has also
been applied to the antechamber command.
Copy link
Member

@jchodera jchodera left a comment

Choose a reason for hiding this comment

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

This is great---thanks!

@jchodera jchodera merged commit d5fe5d0 into openmm:master Aug 2, 2022
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