Migrate to fileutils and lockutils.
Migrate nova to using openstack-common's file and lock utilities. Resolves bug 1063230. Change-Id: I1a4c87856bc08cd33b61d7098ed856baa4583654
This commit is contained in:
@@ -33,6 +33,7 @@ from nova import db
|
||||
from nova import exception
|
||||
from nova import flags
|
||||
from nova.openstack.common import cfg
|
||||
from nova.openstack.common import fileutils
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import utils
|
||||
|
||||
@@ -150,7 +151,7 @@ class CloudPipe(object):
|
||||
key_name)
|
||||
private_key = result['private_key']
|
||||
key_dir = os.path.join(FLAGS.keys_path, context.user_id)
|
||||
utils.ensure_tree(key_dir)
|
||||
fileutils.ensure_tree(key_dir)
|
||||
key_path = os.path.join(key_dir, '%s.pem' % key_name)
|
||||
with open(key_path, 'w') as f:
|
||||
f.write(private_key)
|
||||
|
||||
Reference in New Issue
Block a user