diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/CloudConfig/cc_apt_update_upgrade.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py index 8e95bc33..ea675d51 100644 --- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py +++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py @@ -173,7 +173,8 @@ def find_apt_mirror(cloud, cfg): } mirror = None - if cfg.has_key("apt_mirror"): + cfg_mirror = cfg.get("apt_mirror",None) + if cfg_mirror: mirror = cfg["apt_mirror"] elif cfg.has_key("apt_mirror_search"): mirror = util.search_for_mirror(cfg['apt_mirror_search']) |