Skip to content

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

Merged
kwlzn merged 1 commit into
pex-tool:masterfrom
kwlzn:kwlzn/265
May 27, 2016
Merged

Improve failure modes for os.rename() as used in distribution caching.#271
kwlzn merged 1 commit into
pex-tool:masterfrom
kwlzn:kwlzn/265

Conversation

@kwlzn
Copy link
Copy Markdown
Contributor

@kwlzn kwlzn commented May 26, 2016

Fixes #265.

Comment thread pex/common.py
try:
os.rename(src, dest)
except OSError as e:
if e.errno in allowable_errors:
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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.

Copy link
Copy Markdown

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