diff options
author | Thierry Carrez <thierry@openstack.org> | 2011-03-30 15:37:48 +0000 |
---|---|---|
committer | Tarmac <> | 2011-03-30 15:37:48 +0000 |
commit | f77c58ce317f9674671a1b44563ef3645533c815 (patch) | |
tree | 59b83a53276e6f88a1f01fc76a8ee03bf3566770 | |
parent | c88f1f58f65c80cec8a19cd6e7d821357e86d0e6 (diff) | |
parent | 6f274d0a5818633b072e432ba7182650f0d30001 (diff) | |
download | nova-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.py | 5 |
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 = [] |