diff options
author | Ross Burton <ross.burton@intel.com> | 2017-07-28 17:26:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:43:38 +0100 |
commit | 57be5cc6228518e60f564570a39cebbeb6cf564e (patch) | |
tree | 5a015a45ade51b11ce3c2e5aadff12d6cdd311e1 /lib/bb/fetch2 | |
parent | 2d0203fae08c5ff8dc3e9afaa9a819abc4a1af6f (diff) | |
download | bitbake-contrib-57be5cc6228518e60f564570a39cebbeb6cf564e.tar.gz |
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>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index bd23533eb..7afb2aeb7 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) |