summaryrefslogtreecommitdiff
path: root/cloudinit/sources/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r--cloudinit/sources/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index c174a58f..0dc75f9e 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -257,7 +257,7 @@ class SearchReportStack(reporting.ReportStack):
self.mode, self.source)
super(SearchReportStack, self).__init__(
name=name, description=description, parent=parent,
- exc_result=reporting.status.WARN)
+ result_on_exception=reporting.status.WARN)
def finish_info(self, exc):
# return tuple of description, and value
@@ -276,10 +276,9 @@ def find_source(sys_cfg, distro, paths, ds_deps, cfg_list, pkg_list, reporter):
ds_names = [type_utils.obj_name(f) for f in ds_list]
LOG.debug("Searching for data source in: %s", ds_names)
- for i, cls in enumerate(ds_list):
- srcname=ds_names[i]
+ for name, cls in zip(ds_names, ds_list):
try:
- with SearchReportStack(srcname, ds_deps, reporter) as rep:
+ with SearchReportStack(name, ds_deps, reporter) as rep:
LOG.debug("Seeing if we can get any data from %s", cls)
s = cls(sys_cfg, distro, paths)
if s.get_data():