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

Close file before removing to satisfy Windows requirements - Linked: #27 #28

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Close file before removing to satisfy Windows requirements - Linked: #27 #28

merged 1 commit into from
Aug 15, 2022

Conversation

engineerjoe440
Copy link
Contributor

@engineerjoe440 engineerjoe440 commented Aug 15, 2022

Description:

As illustrated in #27, this PR adds the os.close(...) to handle closing files before attempting to remove them to satisfy Windows requirements. From local testing, this solves the observed issue, quite nicely.

Changes:

  • Add os.close(...) for both the temporary file and temporary SVG file.

Linked Issues:

Closing Thoughts:

  • I was unable to get pre-commit working on my system. Ended up having a number of failures that prevented the commit. So this PR might need an extra-close review to make sure the formatting requirements, etc., are met in the way that you want.
  • THANK YOU, for this AWESOME project! It's wonderful!!!

Copy link
Owner

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Super nice, thanks! 🎉

@ewels
Copy link
Owner

ewels commented Aug 15, 2022

I was unable to get pre-commit working on my system.

No worries - it runs with GitHub Actions anyway, so will automatically pick up and problems once you open the PR.

@ewels ewels merged commit cdf1a0b into ewels:main Aug 15, 2022
ewels added a commit that referenced this pull request Aug 15, 2022
@ewels
Copy link
Owner

ewels commented Aug 15, 2022

Thanks again for this! Just pushed a release v1.2.2 which contains the fix.

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.

PermissionError ... cannot access the file because it is being used by another process: on Windows
2 participants