summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-09-09 13:57:15 -0700
committerScott Moser <smoser@ubuntu.com>2011-09-09 13:57:15 -0700
commita50943ca264a3efafa2da8e4539744478da1e590 (patch)
tree46c1ffef5fbc7867a4ea9f5c51693401b6400482
parent83ca15c56b4bb86dae1ef4065087c5efc89ecaed (diff)
downloadvyos-cloud-init-a50943ca264a3efafa2da8e4539744478da1e590.tar.gz
vyos-cloud-init-a50943ca264a3efafa2da8e4539744478da1e590.zip
accept that public-keys keys in the metadata service might be a string
LP: #845155
-rw-r--r--cloudinit/DataSource.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/DataSource.py b/cloudinit/DataSource.py
index 3f851e14..8e4b47e6 100644
--- a/cloudinit/DataSource.py
+++ b/cloudinit/DataSource.py
@@ -65,6 +65,10 @@ class DataSource:
def get_public_ssh_keys(self):
keys = []
if not self.metadata.has_key('public-keys'): return([])
+
+ if isinstance(self.metadata['public-keys'], str):
+ return(self.metadata['public-keys'])
+
for keyname, klist in self.metadata['public-keys'].items():
# lp:506332 uec metadata service responds with
# data that makes boto populate a string for 'klist' rather