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
Merged

Fix error: module 'os' has no attribute 'mkdirs' #60

merged 2 commits into from
Oct 16, 2017

Conversation

c-w
Copy link
Contributor

@c-w c-w 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
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