Also ensure that if mirror info is not invalid

before we start iterating over it (it could
be sent is as none).
This commit is contained in:
Joshua Harlow
2012-09-28 11:08:46 -07:00
parent 3f9bbeecf7
commit 7fcd9e9086

View File

@@ -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")