summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorMichael Still <mikal@stillhq.com>2012-08-27 13:17:36 +1000
committerMichael Still <mikal@stillhq.com>2012-08-28 07:58:18 +1000
commita73334b47a88e6b1c0f33db5312edd49d50c097b (patch)
tree5fe9e546cf787e7017891de393feb314291da027 /nova/api
parent0d1e9ef251ce91d72d9671c5b4c8c02c87205d3a (diff)
downloadnova-a73334b47a88e6b1c0f33db5312edd49d50c097b.tar.gz
nova-a73334b47a88e6b1c0f33db5312edd49d50c097b.tar.xz
nova-a73334b47a88e6b1c0f33db5312edd49d50c097b.zip
Port existing code to utils.ensure_tree
Now that we have ensure_tree in utils, port most users of os.makedirs() to use it. Change-Id: I3256cbb76bd889f99f1e6f3367bd620645f828a1
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/cloudpipe.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py
index 9b2bb3e61..42721c1a6 100644
--- a/nova/api/openstack/compute/contrib/cloudpipe.py
+++ b/nova/api/openstack/compute/contrib/cloudpipe.py
@@ -65,8 +65,7 @@ class CloudpipeController(object):
# NOTE(vish): One of the drawbacks of doing this in the api is
# the keys will only be on the api node that launched
# the cloudpipe.
- if not os.path.exists(FLAGS.keys_path):
- os.makedirs(FLAGS.keys_path)
+ utils.ensure_tree(FLAGS.keys_path)
def _get_all_cloudpipes(self, context):
"""Get all cloudpipes"""