diff options
-rw-r--r-- | cloudinit/sources/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index 35fc01df..8ab7cf54 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -198,11 +198,13 @@ def list_sources(cfg_list, depends, pkg_list): for pkg in pkg_list: pkg_name = [] if pkg: + # Any package name given, this affects + # the lookup path pkg_name.append(str(pkg)) pkg_name.append(ds_name) try: mod = importer.import_module(".".join(pkg_name)) - except RuntimeError: + except ImportError: continue lister = getattr(mod, "get_datasource_list", None) if not lister: |