diff options
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 6a98fdb1..45dd85ec 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -147,10 +147,10 @@ class Distro(object): def fetch(distro_name, mods=(__name__, )): mod = None for m in mods: + mod_name = "%s.%s" % (m, distro_name) try: - mod_name = "%s.%s" % (m, distro_name) mod = importer.import_module(mod_name) - except RuntimeError: + except ImportError: pass if not mod: raise RuntimeError("No distribution found for distro %s" |