[entropy.client] reorder_mirrors: hostname property can be None

If mirror string (URL string) is malformed, the hostname object
property can be None.
This commit is contained in:
Fabio Erculiani
2012-03-11 18:53:42 +01:00
parent f294ec3c1d
commit 1f334138fb
+3
View File
@@ -2055,6 +2055,9 @@ class MiscMixin:
url_data = entropy.tools.spliturl(mirror)
hostname = url_data.hostname
if hostname is None:
# mirror string is fucked up
continue
if hostname in mirror_cache:
continue
mirror_cache.add(hostname)