diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-25 13:29:07 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-25 13:29:07 -0700 |
commit | cdba22dd0fc249124dfb4e578f44898ba044925a (patch) | |
tree | a74c8625219d61f79e9104825bbd744a7a6f40c0 /cloudinit | |
parent | f74c738fa76db65e45d2bdb19257fe0a78dcd0e0 (diff) | |
download | vyos-cloud-init-cdba22dd0fc249124dfb4e578f44898ba044925a.tar.gz vyos-cloud-init-cdba22dd0fc249124dfb4e578f44898ba044925a.zip |
Allow package_mirrors to be non-existent.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/distros/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 549c1612..6df843ad 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -112,7 +112,7 @@ class Distro(object): return arch def _get_arch_package_mirror_info(self, arch=None): - mirror_info = self.get_option("package_mirrors", None) + mirror_info = self.get_option("package_mirrors") or [] if arch == None: arch = self.get_primary_arch() return _get_arch_package_mirror_info(mirror_info, arch) @@ -122,7 +122,6 @@ class Distro(object): # this resolves the package_mirrors config option # down to a single dict of {mirror_name: mirror_url} arch_info = self._get_arch_package_mirror_info(arch) - return _get_package_mirror_info(availability_zone=availability_zone, mirror_info=arch_info) |