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 error: module 'os' has no attribute 'mkdirs' #60

Merged
merged 2 commits into from Oct 16, 2017

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Contributor

commented Oct 16, 2017

Without this fix, the initialize_backend method fails with the error being silently swallowed by the broad except block.

In order to avoid these sorts of exception masking issues going forward, commit ff68452 also removes the except blocks that wrap the os.makedirs calls in favor of the exist_ok flag so that the only exceptions that get ignored are ones related to the directory already existing. The exist_ok argument was added in Python 3.2 (source). Given that this project supports Python 3.5+, it should be fine to use this flag.

@DaKnOb DaKnOb merged commit 60d6e12 into DaKnOb:master Oct 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.