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: On windows if a file is read only the cleanup reports errors. #38

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

grahamhar
Copy link
Contributor

Adding the onerror to change the file permission then attempt the delete again fixes the issue reported in #37.

tftest.py Show resolved Hide resolved
@ludoo
Copy link
Collaborator

ludoo commented Nov 25, 2021

Thanks a lot for this! Can you sign the CLA, then it's good to go. Nitpick: does it make sense to exit cleanly from remove_readonly in case of errors there?

Adding the onerror to change the file permision then attempt the
delete again should fix this issue.
@ludoo
Copy link
Collaborator

ludoo commented Nov 25, 2021

Merging this, do you need a release on Pypi?

@ludoo ludoo merged commit 4fc4a2c into GoogleCloudPlatform:master Nov 25, 2021
@grahamhar
Copy link
Contributor Author

Merging this, do you need a release on Pypi?

At your convenience that would be great.

@ludoo
Copy link
Collaborator

ludoo commented Nov 25, 2021

Here you go :) https://pypi.org/project/tftest/1.6.1/

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