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

Improve failure modes for os.rename() as used in distribution caching. #271

Merged
merged 1 commit into from
May 27, 2016

Conversation

kwlzn
Copy link
Contributor

@kwlzn kwlzn commented May 26, 2016

Fixes #265.

try:
os.rename(src, dest)
except OSError as e:
if e.errno in allowable_errors:

Choose a reason for hiding this comment

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

in the case of ENOTEMPTY, it's no-op only if dest == src, otherwise we remove src but dest != src

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct - it's not pretty, but this is the current behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eliminated the no-op terminology.

Choose a reason for hiding this comment

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

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants