diff options
-rw-r--r-- | cloudinit/config/cc_apt_update_upgrade.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/config/cc_apt_update_upgrade.py b/cloudinit/config/cc_apt_update_upgrade.py index 42b6f3e9..5c5e510c 100644 --- a/cloudinit/config/cc_apt_update_upgrade.py +++ b/cloudinit/config/cc_apt_update_upgrade.py @@ -45,13 +45,16 @@ EXPORT_GPG_KEYID = """ """ -def handle(_name, cfg, cloud, log, _args): +def handle(name, cfg, cloud, log, _args): update = util.get_cfg_option_bool(cfg, 'apt_update', False) upgrade = util.get_cfg_option_bool(cfg, 'apt_upgrade', False) release = get_release() - mirror = find_apt_mirror(cloud, cfg) + if not mirror: + log.debug(("Skipping module named %s," + " no package 'mirror' located"), name) + return log.debug("Selected mirror at: %s" % mirror) |