]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: fetch2: fix checkstatus fallback to MIRRORS
authorRoss Burton <ross.burton@intel.com>
Fri, 28 Jul 2017 16:26:23 +0000 (17:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 31 Jul 2017 14:13:52 +0000 (15:13 +0100)
The checkstatus() code was expecting checkstatus to throw exceptions if it
failed, but in general it should return False.

(Bitbake rev: 57be5cc6228518e60f564570a39cebbeb6cf564e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index bd23533ebc0e1bfcaa775f5c12df5f392399d95a..7afb2aeb734acb221fbdab99405a5d0c14006ab9 100644 (file)
@@ -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)