commit:     7c0fd425fd33a75dc8978b5d9ef6d4bd7f8a31bc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 14 20:10:41 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 20:11:40 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c0fd425

get_mirror_url: handle UnicodeDecodeError

Fixes: 6a539b7c5163 ("fetch: Support GLEP 75 mirror structure")
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/fetch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/fetch.py 
b/lib/portage/package/ebuild/fetch.py
index 1d5e07260..4e67dff97 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -419,7 +419,7 @@ def get_mirror_url(mirror_url, filename, cache_path=None):
                                mirror_conf.read_from_file(data)
                        except ConfigParserError:
                                pass
-               except IOError:
+               except (IOError, UnicodeDecodeError):
                        pass
 
                cache[mirror_url] = (time.time(), mirror_conf.serialize())

Reply via email to