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
=== modified file 'nova/api/ec2/cloud.py'
--- nova/api/ec2/cloud.py 2011-04-05 17:52:45 +0000
+++ nova/api/ec2/cloud.py 2011-04-06 12:43:24 +0000
@@ -110,7 +110,8 @@
110 'genrootca.sh')110 'genrootca.sh')
111111
112 start = os.getcwd()112 start = os.getcwd()
113 os.makedirs(FLAGS.ca_path)113 if not os.path.exists(FLAGS.ca_path):
114 os.makedirs(FLAGS.ca_path)
114 os.chdir(FLAGS.ca_path)115 os.chdir(FLAGS.ca_path)
115 # TODO(vish): Do this with M2Crypto instead116 # TODO(vish): Do this with M2Crypto instead
116 utils.runthis(_("Generating root CA: %s"), "sh", genrootca_sh_path)117 utils.runthis(_("Generating root CA: %s"), "sh", genrootca_sh_path)