summaryrefslogtreecommitdiff
path: root/cloudinit/sources/__init__.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 11:06:14 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 11:06:14 -0700
commit7eab90c0c88854cc3984ca54d0790dbfe6fd883b (patch)
tree4d22a9443556ab49e9c820ad7e0f188afcbbb405 /cloudinit/sources/__init__.py
parenta2c80a6ae5eb064a6d69ca0a7b14056dc8504030 (diff)
downloadvyos-cloud-init-7eab90c0c88854cc3984ca54d0790dbfe6fd883b.tar.gz
vyos-cloud-init-7eab90c0c88854cc3984ca54d0790dbfe6fd883b.zip
Cleanup some of the logging (its a little to verbose).
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r--cloudinit/sources/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index 831f97ea..a227e050 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -169,13 +169,13 @@ def find_source(sys_cfg, distro, paths, ds_deps, cfg_list, pkg_list):
LOG.info("Searching for data source in: %s", ds_names)
for cls in ds_list:
- ds = util.obj_name(cls)
try:
+ LOG.debug("Seeing if we can get any data from %s", cls)
s = cls(sys_cfg, distro, paths)
if s.get_data():
- return (s, ds)
+ return (s, util.obj_name(cls))
except Exception:
- util.logexc(LOG, "Getting data from %s failed", ds)
+ util.logexc(LOG, "Getting data from %s failed", cls)
msg = "Did not find any data source, searched classes: %s" % (ds_names)
raise DataSourceNotFoundException(msg)
@@ -188,7 +188,7 @@ def find_source(sys_cfg, distro, paths, ds_deps, cfg_list, pkg_list):
def list_sources(cfg_list, depends, pkg_list):
src_list = []
LOG.info(("Looking for for data source in: %s,"
- " %s that matches %s"), cfg_list, pkg_list, depends)
+ " via packages %s that matches dependencies %s"), cfg_list, pkg_list, depends)
for ds_coll in cfg_list:
ds_name = str(ds_coll)
if not ds_name.startswith(DS_PREFIX):
@@ -209,8 +209,8 @@ def list_sources(cfg_list, depends, pkg_list):
if not cls_matches:
continue
src_list.extend(cls_matches)
- LOG.debug(("Found a match for data source %s"
- " in %s with matches %s"), ds_name, mod, cls_matches)
+ LOG.debug(("Found a match"
+ " in %s with matches %s"), mod, cls_matches)
break
return src_list