summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
-rw-r--r--cloudinit/sources/DataSourceDigitalOcean.py11
2 files changed, 8 insertions, 7 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 27658073..15244a0d 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -79,8 +79,8 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource):
else:
mtype = None
sync = True
- results = util.mount_cb(dev, read_config_drive, mtype=mtype,
- sync=sync)
+ results = util.mount_cb(dev, read_config_drive,
+ mtype=mtype, sync=sync)
found = dev
except openstack.NonReadable:
pass
diff --git a/cloudinit/sources/DataSourceDigitalOcean.py b/cloudinit/sources/DataSourceDigitalOcean.py
index 069bdb41..8f27ee89 100644
--- a/cloudinit/sources/DataSourceDigitalOcean.py
+++ b/cloudinit/sources/DataSourceDigitalOcean.py
@@ -31,6 +31,7 @@ BUILTIN_DS_CONFIG = {
MD_RETRIES = 0
MD_TIMEOUT = 1
+
class DataSourceDigitalOcean(sources.DataSource):
def __init__(self, sys_cfg, distro, paths):
sources.DataSource.__init__(self, sys_cfg, distro, paths)
@@ -51,10 +52,10 @@ class DataSourceDigitalOcean(sources.DataSource):
self.timeout = MD_TIMEOUT
def get_data(self):
- caller = functools.partial(util.read_file_or_url, timeout=self.timeout,
- retries=self.retries)
+ caller = functools.partial(util.read_file_or_url,
+ timeout=self.timeout, retries=self.retries)
md = ec2_utils.MetadataMaterializer(str(caller(self.metadata_address)),
- base_url=self.metadata_address,
+ base_url=self.metadata_address,
caller=caller)
self.metadata = md.materialize()
@@ -72,9 +73,9 @@ class DataSourceDigitalOcean(sources.DataSource):
def get_public_ssh_keys(self):
if type(self.metadata['public-keys']) is StringType:
- return [self.metadata['public-keys']]
+ return [self.metadata['public-keys']]
else:
- return self.metadata['public-keys']
+ return self.metadata['public-keys']
@property
def availability_zone(self):