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 failing to acquire lock in case of parallel runs #1524

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Fix failing to acquire lock in case of parallel runs #1524

merged 1 commit into from
Jan 29, 2020

Conversation

gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Jan 29, 2020

Resolves #1516

@gaborbernat gaborbernat merged commit 5629b41 into pypa:rewrite Jan 29, 2020
@gaborbernat gaborbernat deleted the 1516 branch January 29, 2020 15:23
try:
os.makedirs(str(self.path))
except OSError:
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

this should only catch the exception if it's EEXIST and it's a directory I believe -- other OSErrors should raise here (in py3+ os.makedirs(..., exist_ok=True))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not too worried about this, as if this fails for any other reason than EEXIST the next line will also fail, and done it like this to handle both platforms 🤔 I know about exists_ok=True... but that does not work on python 2...

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