From 3b69f410718f7d8868b8cbaa04e3969811ee89a9 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 4 Apr 2016 12:31:28 -0400 Subject: 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. --- cloudinit/sources/DataSourceCloudStack.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cloudinit/sources/DataSourceCloudStack.py') diff --git a/cloudinit/sources/DataSourceCloudStack.py b/cloudinit/sources/DataSourceCloudStack.py index 64595020..455a4652 100644 --- a/cloudinit/sources/DataSourceCloudStack.py +++ b/cloudinit/sources/DataSourceCloudStack.py @@ -89,8 +89,6 @@ class DataSourceCloudStack(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)) @@ -109,10 +107,6 @@ class DataSourceCloudStack(sources.DataSource): return (max_wait, timeout) def wait_for_metadata_service(self): - mcfg = self.ds_cfg - if not mcfg: - mcfg = {} - (max_wait, timeout) = self._get_url_settings() urls = [uhelp.combine_url(self.metadata_address, -- cgit v1.2.3