summaryrefslogtreecommitdiff
path: root/cloudinit/mergers
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2014-09-02 13:31:18 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-09-02 13:31:18 -0700
commit141caf7f3b224c0265c7bb0014b96ca08aa67193 (patch)
tree92e23f731504ee7f2d9f2f31feb76b28179ae3b9 /cloudinit/mergers
parent128fd80cb0b27430def29bee7a8c473facd84be8 (diff)
downloadvyos-cloud-init-141caf7f3b224c0265c7bb0014b96ca08aa67193.tar.gz
vyos-cloud-init-141caf7f3b224c0265c7bb0014b96ca08aa67193.zip
Remove/adjust the verbose 'failed at attempted import of' log
Instead of using this log (which really isn't a failure) we should instead of just return the looked up locations and then if there really is an error the caller can handle the usage of the looked up locations as they choose fit.
Diffstat (limited to 'cloudinit/mergers')
-rw-r--r--cloudinit/mergers/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cloudinit/mergers/__init__.py b/cloudinit/mergers/__init__.py
index 650b42a9..03aa1ee1 100644
--- a/cloudinit/mergers/__init__.py
+++ b/cloudinit/mergers/__init__.py
@@ -143,12 +143,14 @@ def construct(parsed_mergers):
for (m_name, m_ops) in parsed_mergers:
if not m_name.startswith(MERGER_PREFIX):
m_name = MERGER_PREFIX + str(m_name)
- merger_locs = importer.find_module(m_name,
- [__name__],
- [MERGER_ATTR])
+ merger_locs, looked_locs = importer.find_module(m_name,
+ [__name__],
+ [MERGER_ATTR])
if not merger_locs:
msg = ("Could not find merger module named '%s' "
- "with attribute '%s'") % (m_name, MERGER_ATTR)
+ "with attribute '%s' (searched %s)") % (m_name,
+ MERGER_ATTR,
+ looked_locs)
raise ImportError(msg)
else:
mod = importer.import_module(merger_locs[0])