summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Carrez <thierry@openstack.org>2011-03-30 15:28:21 +0200
committerThierry Carrez <thierry@openstack.org>2011-03-30 15:28:21 +0200
commit6f274d0a5818633b072e432ba7182650f0d30001 (patch)
tree6d87e6a3d4aa854f67f8bf3c92cdf0e952566db6
parent56b5bcf86f1bee60a4b727414cca1ac5e714d09a (diff)
downloadnova-6f274d0a5818633b072e432ba7182650f0d30001.tar.gz
nova-6f274d0a5818633b072e432ba7182650f0d30001.tar.xz
nova-6f274d0a5818633b072e432ba7182650f0d30001.zip
Do not push 'None' to authorized_keys when no key is specified
-rw-r--r--nova/virt/libvirt_conn.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py
index b28584cb6..f34ea7225 100644
--- a/nova/virt/libvirt_conn.py
+++ b/nova/virt/libvirt_conn.py
@@ -828,7 +828,10 @@ class LibvirtConnection(driver.ComputeDriver):
if FLAGS.libvirt_type == 'lxc':
target_partition = None
- key = str(inst['key_data'])
+ if inst['key_data']:
+ key = str(inst['key_data'])
+ else:
+ key = None
net = None
nets = []