summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Carrez <thierry@openstack.org>2011-03-30 15:37:48 +0000
committerTarmac <>2011-03-30 15:37:48 +0000
commitf77c58ce317f9674671a1b44563ef3645533c815 (patch)
tree59b83a53276e6f88a1f01fc76a8ee03bf3566770
parentc88f1f58f65c80cec8a19cd6e7d821357e86d0e6 (diff)
parent6f274d0a5818633b072e432ba7182650f0d30001 (diff)
downloadnova-f77c58ce317f9674671a1b44563ef3645533c815.tar.gz
nova-f77c58ce317f9674671a1b44563ef3645533c815.tar.xz
nova-f77c58ce317f9674671a1b44563ef3645533c815.zip
Key was converted through str() even if None, resulting in "None" being
added to authorized_keys when no key was 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 = []