Merge lp:~soren/nova/ca-separate-code-and-state into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: termie
Approved revision: 947
Merged at revision: 947
Proposed branch: lp:~soren/nova/ca-separate-code-and-state
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 13 lines (+2/-1)
1 file modified
nova/api/ec2/cloud.py (+2/-1)
To merge this branch: bzr merge lp:~soren/nova/ca-separate-code-and-state
Reviewer Review Type Date Requested Status
termie (community) Approve
Sandy Walsh (community) Approve
Review via email: mp+56557@code.launchpad.net

Commit message

Only create ca_path directory if it does not already exist.

Description of the change

I somehow thought makedirs acted like "mkdir -p" i.e. would ignore it if the directory already existed.

To post a comment you must log in.
947. By Soren Hansen

Added bug reference

Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

lgtm

review: Approve
Revision history for this message
termie (termie) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/ec2/cloud.py'
2--- nova/api/ec2/cloud.py 2011-04-05 17:52:45 +0000
3+++ nova/api/ec2/cloud.py 2011-04-06 12:43:24 +0000
4@@ -110,7 +110,8 @@
5 'genrootca.sh')
6
7 start = os.getcwd()
8- os.makedirs(FLAGS.ca_path)
9+ if not os.path.exists(FLAGS.ca_path):
10+ os.makedirs(FLAGS.ca_path)
11 os.chdir(FLAGS.ca_path)
12 # TODO(vish): Do this with M2Crypto instead
13 utils.runthis(_("Generating root CA: %s"), "sh", genrootca_sh_path)