summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-07-28 17:26:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-30 08:43:38 +0100
commit57be5cc6228518e60f564570a39cebbeb6cf564e (patch)
tree5a015a45ade51b11ce3c2e5aadff12d6cdd311e1
parent2d0203fae08c5ff8dc3e9afaa9a819abc4a1af6f (diff)
downloadbitbake-contrib-57be5cc6228518e60f564570a39cebbeb6cf564e.tar.gz
bitbake-contrib-57be5cc6228518e60f564570a39cebbeb6cf564e.tar.bz2
bitbake-contrib-57be5cc6228518e60f564570a39cebbeb6cf564e.zip
fetch2: fix checkstatus fallback to MIRRORS
The checkstatus() code was expecting checkstatus to throw exceptions if it failed, but in general it should return False. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index bd23533ebc..7afb2aeb73 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1726,9 +1726,8 @@ class Fetch(object):
ret = try_mirrors(self, self.d, ud, mirrors, True)
if not ret:
# Next try checking from the original uri, u
- try:
- ret = m.checkstatus(self, ud, self.d)
- except:
+ ret = m.checkstatus(self, ud, self.d)
+ if not ret:
# Finally, try checking uri, u, from MIRRORS
mirrors = mirror_from_string(self.d.getVar('MIRRORS'))
ret = try_mirrors(self, self.d, ud, mirrors, True)