diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-12-16 15:40:21 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-12-16 15:40:21 -0500 |
commit | 71e77a29142dcce86350c47b5848c8f0beebfe4d (patch) | |
tree | b9655c98e3972d011639b235aeffabc5adc925f7 /cloudinit | |
parent | baa79b1d6dc5969fc55b2ced65af075846ebea7a (diff) | |
download | vyos-cloud-init-71e77a29142dcce86350c47b5848c8f0beebfe4d.tar.gz vyos-cloud-init-71e77a29142dcce86350c47b5848c8f0beebfe4d.zip |
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.
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']) |