summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceDigitalOcean.py6
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):