diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-01-16 13:30:12 -0500 |
---|---|---|
committer | Ryan Harper <ryan.harper@canonical.com> | 2020-01-16 12:30:12 -0600 |
commit | 651e24066ba4b9464c7843553f60d17a459cf06e (patch) | |
tree | b4bae771e62bf725b7d568efb9741f2be88a915c /cloudinit/config/cc_apt_configure.py | |
parent | 259d9c501472315e539701f00095743390eb89e5 (diff) | |
download | vyos-cloud-init-651e24066ba4b9464c7843553f60d17a459cf06e.tar.gz vyos-cloud-init-651e24066ba4b9464c7843553f60d17a459cf06e.zip |
util: rename get_architecture to get_dpkg_architecture (#173)
This makes it clearer that we should only use this in code paths that
will definitely have dpkg available to them.
- Rename get_architecture -> get_dpkg_architecture
- Add docstring to get_dpkg_architecture
Diffstat (limited to 'cloudinit/config/cc_apt_configure.py')
-rw-r--r-- | cloudinit/config/cc_apt_configure.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py index 4a3aed36..c44dec45 100644 --- a/cloudinit/config/cc_apt_configure.py +++ b/cloudinit/config/cc_apt_configure.py @@ -253,7 +253,7 @@ def get_default_mirrors(arch=None, target=None): architecture, for more see: https://wiki.ubuntu.com/UbuntuDevelopment/PackageArchive#Ports""" if arch is None: - arch = util.get_architecture(target) + arch = util.get_dpkg_architecture(target) if arch in PRIMARY_ARCHES: return PRIMARY_ARCH_MIRRORS.copy() if arch in PORTS_ARCHES: @@ -303,7 +303,7 @@ def apply_apt(cfg, cloud, target): LOG.debug("handling apt config: %s", cfg) release = util.lsb_release(target=target)['codename'] - arch = util.get_architecture(target) + arch = util.get_dpkg_architecture(target) mirrors = find_apt_mirror_info(cfg, cloud, arch=arch) LOG.debug("Apt Mirror info: %s", mirrors) @@ -896,7 +896,7 @@ def find_apt_mirror_info(cfg, cloud, arch=None): """ if arch is None: - arch = util.get_architecture() + arch = util.get_dpkg_architecture() LOG.debug("got arch for mirror selection: %s", arch) pmirror = get_mirror(cfg, "primary", arch, cloud) LOG.debug("got primary mirror: %s", pmirror) |