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/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cloudinit/sources/__init__.py') diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index 82cd3553..6bf2c33b 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -70,6 +70,9 @@ class DataSource(object): self.ds_cfg = util.get_cfg_by_path(self.sys_cfg, ("datasource", name), {}) + if not self.ds_cfg: + self.ds_cfg = {} + if not ud_proc: self.ud_proc = ud.UserDataProcessor(self.paths) else: -- cgit v1.2.3