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

Folder creation fix #201

Merged
merged 2 commits into from
Jan 29, 2020
Merged

Conversation

flaviussn
Copy link
Contributor

@flaviussn flaviussn commented Jan 29, 2020

As long as cache_dir and output_dir can be configured, if the path doesn't exist, should be created.

mkdir() can create a single sub-directory and makedirs() creates all the intermediate directories

Copy link
Owner

@ThilinaRajapakse ThilinaRajapakse left a comment

Choose a reason for hiding this comment

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

I agree. It's better that we switch to makedirs.

I think it would be even better if we went with;

os.makedirs(self.args["cache_dir"], exist_ok=True)

So that we can drop the check for whether the directory exists altogether.

What do you think?

@flaviussn
Copy link
Contributor Author

I agree. I would change it for every makedirs

@ThilinaRajapakse
Copy link
Owner

Great! Thank you!

@flaviussn
Copy link
Contributor Author

Format and lint should be performed. There are a lot of code style inconsistencies in the master version.

Copy link
Owner

@ThilinaRajapakse ThilinaRajapakse left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@ThilinaRajapakse
Copy link
Owner

Yeah, I'll do the formatting stuff soon.

@ThilinaRajapakse ThilinaRajapakse merged commit d8493eb into ThilinaRajapakse:master Jan 29, 2020
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