summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceEc2.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-04 12:31:28 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-04 12:31:28 -0400
commit3b69f410718f7d8868b8cbaa04e3969811ee89a9 (patch)
tree4a1ab11d76fa9cde63214234cfa3eeefea542238 /cloudinit/sources/DataSourceEc2.py
parent098241594ff83a2e2070a2e9b4581301e19a76f9 (diff)
downloadvyos-cloud-init-3b69f410718f7d8868b8cbaa04e3969811ee89a9.tar.gz
vyos-cloud-init-3b69f410718f7d8868b8cbaa04e3969811ee89a9.zip
DataSource: set ds_cfg to be a dictionary
if the Datasource does not have an entry in config, then set it to be a empty dictionary rather than None. Also remove places that did this elsewhere.
Diffstat (limited to 'cloudinit/sources/DataSourceEc2.py')
-rw-r--r--cloudinit/sources/DataSourceEc2.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 3ef2c6af..6fe2a0bb 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -84,8 +84,6 @@ class DataSourceEc2(sources.DataSource):
def _get_url_settings(self):
mcfg = self.ds_cfg
- if not mcfg:
- mcfg = {}
max_wait = 120
try:
max_wait = int(mcfg.get("max_wait", max_wait))
@@ -102,8 +100,6 @@ class DataSourceEc2(sources.DataSource):
def wait_for_metadata_service(self):
mcfg = self.ds_cfg
- if not mcfg:
- mcfg = {}
(max_wait, timeout) = self._get_url_settings()
if max_wait <= 0: