summaryrefslogtreecommitdiff
path: root/ec2init
diff options
context:
space:
mode:
authorScott Moser <smoser@nelson>2010-01-12 12:16:01 -0500
committerScott Moser <smoser@nelson>2010-01-12 12:16:01 -0500
commit86d8955a5ca3e374fcabe7f6b0f9ebfe47d47441 (patch)
tree06664d6a6a040b9c999c626aad7c3e709a5c2481 /ec2init
parent969cbd1b5daa98a6e4d0d87750bde348fcf267e6 (diff)
downloadvyos-cloud-init-86d8955a5ca3e374fcabe7f6b0f9ebfe47d47441.tar.gz
vyos-cloud-init-86d8955a5ca3e374fcabe7f6b0f9ebfe47d47441.zip
work around differences in uec and ec2 metadata services
LP: #506332
Diffstat (limited to 'ec2init')
-rw-r--r--ec2init/DataSourceEc2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ec2init/DataSourceEc2.py b/ec2init/DataSourceEc2.py
index 84f2f71c..9afbe8b9 100644
--- a/ec2init/DataSourceEc2.py
+++ b/ec2init/DataSourceEc2.py
@@ -97,6 +97,11 @@ class DataSourceEc2(DataSource.DataSource):
keys = []
if not self.metadata.has_key('public-keys'): return([])
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
+ # than a list.
+ if isinstance(klist,str):
+ klist = [ klist ]
for pkey in klist:
# there is an empty string at the end of the keylist, trim it
if pkey: