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 mkdir conflict in save_inference_model #14285

Merged

Conversation

seiriosPlus
Copy link
Collaborator

No description provided.

os.makedirs(dirname)
except OSError as e:
if e.errno != errno.EEXIST:
raise
Copy link
Member

Choose a reason for hiding this comment

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

throw the original exception if the exception is not errno.EEXIST

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

raise will output Exception not errno.EEXIST.

jacquesqiao
jacquesqiao previously approved these changes Nov 7, 2018
Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM!

test=develop
@seiriosPlus seiriosPlus merged commit e564eb3 into PaddlePaddle:develop Nov 7, 2018
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