diff options
author | Neal Shrader <neal@digitalocean.com> | 2014-10-17 16:26:46 -0400 |
---|---|---|
committer | Neal Shrader <neal@digitalocean.com> | 2014-10-17 16:26:46 -0400 |
commit | fdef6a9f84c5720bbd37f3eb98c9b7c58913bbfd (patch) | |
tree | 89b66d2711c068981daafcb34c3ab8aaab93c690 /cloudinit/sources/DataSourceDigitalOcean.py | |
parent | 01e8df0557098093a0e3444f41ba3f1861ded316 (diff) | |
download | vyos-cloud-init-fdef6a9f84c5720bbd37f3eb98c9b7c58913bbfd.tar.gz vyos-cloud-init-fdef6a9f84c5720bbd37f3eb98c9b7c58913bbfd.zip |
Correct handling of single/multiple ssh keys
Diffstat (limited to 'cloudinit/sources/DataSourceDigitalOcean.py')
-rw-r--r-- | cloudinit/sources/DataSourceDigitalOcean.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceDigitalOcean.py b/cloudinit/sources/DataSourceDigitalOcean.py index b7afca93..c59232ca 100644 --- a/cloudinit/sources/DataSourceDigitalOcean.py +++ b/cloudinit/sources/DataSourceDigitalOcean.py @@ -19,6 +19,7 @@ from cloudinit import util from cloudinit import sources from cloudinit import url_helper from cloudinit import ec2_utils +from types import * import functools @@ -71,7 +72,10 @@ class DataSourceDigitalOcean(sources.DataSource): return "\n".join(self.metadata['vendor-data']) def get_public_ssh_keys(self): - return self.metadata['public-keys'].splitlines() + if type(self.metadata['public-keys']) is StringType: + return [self.metadata['public-keys']] + else: + return self.metadata['public-keys'] @property def availability_zone(self): |