aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-10-14 13:37:25 -0700
committerZac Medico <zmedico@gentoo.org>2019-10-14 13:38:29 -0700
commit76fd5593d8ddf446f445ba3dd9da18a6e44dc5b3 (patch)
tree9c69c510664b6732d5c1e24ef31d9d223b2f3a9d
parentget_mirror_url: do not cache negative results (diff)
downloadportage-76fd5593d8ddf446f445ba3dd9da18a6e44dc5b3.tar.gz
portage-76fd5593d8ddf446f445ba3dd9da18a6e44dc5b3.tar.bz2
portage-76fd5593d8ddf446f445ba3dd9da18a6e44dc5b3.zip
get_mirror_url: do not cache after ConfigParserError
Bug: https://bugs.gentoo.org/697566 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/portage/package/ebuild/fetch.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index 107fba50e..debab38a2 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -415,11 +415,8 @@ def get_mirror_url(mirror_url, filename, cache_path=None):
finally:
f.close()
- try:
- mirror_conf.read_from_file(data)
- except ConfigParserError:
- pass
- except (IOError, UnicodeDecodeError):
+ mirror_conf.read_from_file(data)
+ except (ConfigParserError, IOError, UnicodeDecodeError):
# Do not cache negative results.
cache_path = None