diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-09-02 13:31:18 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-09-02 13:31:18 -0700 |
commit | 141caf7f3b224c0265c7bb0014b96ca08aa67193 (patch) | |
tree | 92e23f731504ee7f2d9f2f31feb76b28179ae3b9 /cloudinit/distros | |
parent | 128fd80cb0b27430def29bee7a8c473facd84be8 (diff) | |
download | vyos-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/distros')
-rw-r--r-- | cloudinit/distros/__init__.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 4b41220e..9c9211fe 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -847,12 +847,10 @@ def extract_default(users, default_name=None, default_config=None): def fetch(name): - locs = importer.find_module(name, - ['', __name__], - ['Distro']) + locs, looked_locs = importer.find_module(name, ['', __name__], ['Distro']) if not locs: - raise ImportError("No distribution found for distro %s" - % (name)) + raise ImportError("No distribution found for distro %s (searched %s)" + % (name, looked_locs)) mod = importer.import_module(locs[0]) cls = getattr(mod, 'Distro') return cls |