diff options
Diffstat (limited to 'ec2init')
-rw-r--r-- | ec2init/DataSourceEc2.py | 5 |
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: |