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 unit test error: File exists: '/root/.cache/paddle/dataset' #2536

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

helinwang
Copy link
Contributor

@helinwang helinwang commented Jun 20, 2017

Fixes #2535

@helinwang helinwang merged commit 6ef1ccd into PaddlePaddle:develop Jun 20, 2017
@helinwang helinwang deleted the 2535 branch June 20, 2017 23:27
try:
os.makedirs(DATA_HOME)
except OSError as exc:
if exc.errno != errno.EEXIST:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't get it -- it seems that we create DATA_HOME only if it doesn't exist; why would we need to catch the EEXIST exception here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because ctest runs multiple python process concurrently, so this could happen.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean that we can remove the check for existence in L30 and just run the try block?

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.

3 participants