From 1f334138fbf1005228f3fc55bc23bdfdf60e0e2a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 11 Mar 2012 18:53:42 +0100 Subject: [PATCH] [entropy.client] reorder_mirrors: hostname property can be None If mirror string (URL string) is malformed, the hostname object property can be None. --- lib/entropy/client/interfaces/methods.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/entropy/client/interfaces/methods.py b/lib/entropy/client/interfaces/methods.py index 739fde18b..4099c79eb 100644 --- a/lib/entropy/client/interfaces/methods.py +++ b/lib/entropy/client/interfaces/methods.py @@ -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)