summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceAltCloud.py3
-rw-r--r--cloudinit/sources/DataSourceOpenNebula.py4
-rw-r--r--cloudinit/sources/__init__.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceAltCloud.py b/cloudinit/sources/DataSourceAltCloud.py
index c2b0eac2..8528fa10 100644
--- a/cloudinit/sources/DataSourceAltCloud.py
+++ b/cloudinit/sources/DataSourceAltCloud.py
@@ -201,8 +201,7 @@ class DataSourceAltCloud(sources.DataSource):
util.logexc(LOG, 'Failed command: %s\n%s', ' '.join(cmd), _err)
return False
except OSError as _err:
- util.logexc(LOG, 'Failed command: %s\n%s', ' '.join(cmd),
- _err.message)
+ util.logexc(LOG, 'Failed command: %s\n%s', ' '.join(cmd), _err)
return False
try:
diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py
index 1f1baf46..cd75e6ea 100644
--- a/cloudinit/sources/DataSourceOpenNebula.py
+++ b/cloudinit/sources/DataSourceOpenNebula.py
@@ -286,12 +286,12 @@ def parse_shell_config(content, keylist=None, bash=None, asuser=None,
output = output[0:-1] # remove trailing null
# go through output. First _start_ is for 'preset', second for 'target'.
- # Add to target only things were changed and not in volitile
+ # Add to ret only things were changed and not in excluded.
for line in output.split("\x00"):
try:
(key, val) = line.split("=", 1)
if target is preset:
- target[key] = val
+ preset[key] = val
elif (key not in excluded and
(key in keylist_in or preset.get(key) != val)):
ret[key] = val
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index 18294505..5c99437e 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -50,7 +50,7 @@ class DataSource(object):
self.distro = distro
self.paths = paths
self.userdata = None
- self.metadata = None
+ self.metadata = {}
self.userdata_raw = None
self.vendordata = None
self.vendordata_raw = None