From 71e77a29142dcce86350c47b5848c8f0beebfe4d Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 16 Dec 2011 15:40:21 -0500 Subject: only use apt_mirror if it is non-empty if apt_mirror was set to "" or False in the config, we would have used that. --- cloudinit/CloudConfig/cc_apt_update_upgrade.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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']) -- cgit v1.2.3