diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-28 11:08:46 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-28 11:08:46 -0700 |
commit | 46be69003044a7d60d9566dbddd1b7fd93054c8f (patch) | |
tree | 4587791aad6aeb53d84acfee3c5f1b0ea56df73f /cloudinit/distros | |
parent | 332ef83d77853714b88358de301bda30e82aaf62 (diff) | |
download | vyos-cloud-init-46be69003044a7d60d9566dbddd1b7fd93054c8f.tar.gz vyos-cloud-init-46be69003044a7d60d9566dbddd1b7fd93054c8f.zip |
Also ensure that if mirror info is not invalid
before we start iterating over it (it could
be sent is as none).
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 55e4b8db..55ab1f10 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -386,6 +386,8 @@ def _get_package_mirror_info(mirror_info, availability_zone=None, # given a arch specific 'mirror_info' entry (from package_mirrors) # search through the 'search' entries, and fallback appropriately # return a dict with only {name: mirror} entries. + if not mirror_info: + mirror_info = {} ec2_az_re = ("^[a-z][a-z]-(%s)-[1-9][0-9]*[a-z]$" % "north|northeast|east|southeast|south|southwest|west|northwest") |