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

Fixes #2515 - Make tmp path if it doesn't already exist. #2516

Merged
merged 2 commits into from
Jun 26, 2018

Conversation

miketaylr
Copy link
Member

This PR fixes issue #2515.

If the /tmp/ path didn't exist (because a user or automation hadnt yet built the project), it would throw. This fixes that.

r? @karlcow

@miketaylr miketaylr requested a review from karlcow June 21, 2018 17:12
Copy link
Member

@karlcow karlcow left a comment

Choose a reason for hiding this comment

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

Very good!
A small thing which is just for DRY and future potential mistakes.

os.makedirs(os.path.join(os.getcwd(), 'tmp'))
except OSError as exception:
if exception.errno != errno.EEXIST:
raise
tempfile.tempdir = os.path.join(os.getcwd(), 'tmp')

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr miketaylr merged commit 4a3c8d5 into master Jun 26, 2018
@miketaylr miketaylr deleted the issues/2515/1 branch June 26, 2018 17:40
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