[#87] Create log directory if it doesn't exist. #88

Merged
merged 2 commits into from Mar 14, 2012

Conversation

Projects
None yet
2 participants
Contributor

markbirbeck commented Mar 14, 2012

Proposed fix for issue #87.

@tobami tobami and 1 other commented on an outdated diff Mar 14, 2012

littlechef/solo.py
@@ -73,6 +74,8 @@ def configure(current_node=None):
"Could not modify {0} dir. Do you have sudo rights?".format(
node_work_path))
# Set up chef solo configuration
+ if not exists(logging_path):
+ sudo('mkdir -p {}'.format(logging_path))
@tobami

tobami Mar 14, 2012

Owner

a 0 is missing. It should be sudo('mkdir -p {0}'.format(logging_path))

@markbirbeck

markbirbeck Mar 14, 2012

Contributor

Sorry...it's optional in Python 2.7, and I've got into the habit of not using it!

Will put a zero in.

@tobami

tobami Mar 14, 2012

Owner

oh, I didn't know that. But I guess it is too early to completely drop 2.6 compatibility

@markbirbeck

markbirbeck Mar 14, 2012

Contributor

Yes...definitely better to have the '0' in there, and I usually do. Sorry. :)

Owner

tobami commented Mar 14, 2012

Otherwise it looks good.

Owner

tobami commented Mar 14, 2012

great, thanks!

@tobami tobami added a commit that referenced this pull request Mar 14, 2012

@tobami tobami Merge pull request #88 from sidewinderlabs/feature/87-log-path
[#87] Create log directory if it doesn't exist.
de9c18e

@tobami tobami merged commit de9c18e into tobami:master Mar 14, 2012

Owner

tobami commented Mar 14, 2012

Closes #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment