summaryrefslogtreecommitdiff
path: root/cloudinit/sources/__init__.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-07-31 16:12:37 +0000
committerScott Moser <smoser@ubuntu.com>2015-07-31 16:12:37 +0000
commitf36706442b4c1913ea8f7953993b9e03f3adf623 (patch)
tree2308f4288a266ff5edc9664ddd44261882367d43 /cloudinit/sources/__init__.py
parentdc2321f5fe5fcfc143da81d694baf0b767eb2cbe (diff)
downloadvyos-cloud-init-f36706442b4c1913ea8f7953993b9e03f3adf623.tar.gz
vyos-cloud-init-f36706442b4c1913ea8f7953993b9e03f3adf623.zip
address Daniel's comments in review
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():