diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-08-22 14:36:02 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-08-22 14:36:02 -0400 |
commit | cb740b3018f55c21bda3a38b216d4ed61ab30d42 (patch) | |
tree | 74113e0fa5ecd8ec99bd4e4342bf127552c3e49f /cloudinit/config | |
parent | 0bc9f3aad55b6b1d50f80ef1b1688c2ceb1c8a84 (diff) | |
download | vyos-cloud-init-cb740b3018f55c21bda3a38b216d4ed61ab30d42.tar.gz vyos-cloud-init-cb740b3018f55c21bda3a38b216d4ed61ab30d42.zip |
fix for pep8 issues and seemingly functional now.
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_apt_update_upgrade.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/config/cc_apt_update_upgrade.py b/cloudinit/config/cc_apt_update_upgrade.py index 4b5f6a6d..49a93415 100644 --- a/cloudinit/config/cc_apt_update_upgrade.py +++ b/cloudinit/config/cc_apt_update_upgrade.py @@ -66,8 +66,8 @@ def handle(name, cfg, cloud, log, _args): 'apt_preserve_sources_list', False): generate_sources_list(release, mirrors, cloud, log) old_mirrors = cfg.get('apt_old_mirrors', - old_mirrors = {"primary": "archive.ubuntu.com/ubuntu", - "security": "security.ubuntu.com/ubuntu"}) + {"primary": "archive.ubuntu.com/ubuntu", + "security": "security.ubuntu.com/ubuntu"}) rename_apt_lists(old_mirrors, mirrors) # Set up any apt proxy @@ -166,6 +166,7 @@ def rename_apt_lists(old_mirrors, new_mirrors, lists_d="/var/lib/apt/lists"): for filename in glob.glob("%s_*" % oprefix): util.rename(filename, "%s%s" % (nprefix, filename[olen:])) + def get_release(): (stdout, _stderr) = util.subp(['lsb_release', '-cs']) return stdout.strip() @@ -276,8 +277,8 @@ def find_apt_mirror_info(cloud, cfg): mirror_list.append(mirrorfmt % (post)) mirror = util.search_for_mirror(mirror_list) - - mirror_info = cloud.get_package_mirror_info() + + mirror_info = cloud.datasource.get_package_mirror_info() # this is a bit strange. # if mirror is set, then one of the legacy options above set it |