Skip to content

Comments

Fix unit test error: File exists: '/root/.cache/paddle/dataset'#2536

Merged
helinwang merged 1 commit intoPaddlePaddle:developfrom
helinwang:2535
Jun 20, 2017
Merged

Fix unit test error: File exists: '/root/.cache/paddle/dataset'#2536
helinwang merged 1 commit intoPaddlePaddle:developfrom
helinwang:2535

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