aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-10-14 13:34:37 -0700
committerZac Medico <zmedico@gentoo.org>2019-10-14 13:35:10 -0700
commit41ae830027648e65f867476a4039e7f51db64673 (patch)
treef36f3eaca5985a4f83c411ac4dd4a416e77f5e9a
parentget_mirror_url: handle UnicodeDecodeError (diff)
downloadportage-41ae830027648e65f867476a4039e7f51db64673.tar.gz
portage-41ae830027648e65f867476a4039e7f51db64673.tar.bz2
portage-41ae830027648e65f867476a4039e7f51db64673.zip
get_mirror_url: do not cache negative results
Bug: https://bugs.gentoo.org/697566 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/portage/package/ebuild/fetch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index 4e67dff97..107fba50e 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -420,7 +420,8 @@ def get_mirror_url(mirror_url, filename, cache_path=None):
except ConfigParserError:
pass
except (IOError, UnicodeDecodeError):
- pass
+ # Do not cache negative results.
+ cache_path = None
cache[mirror_url] = (time.time(), mirror_conf.serialize())
if cache_path is not None: