From 6986198da9929d017bf2ff259025c38f7bdad68f Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 28 Jul 2017 17:26:23 +0100 Subject: bitbake: 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. (Bitbake rev: 57be5cc6228518e60f564570a39cebbeb6cf564e) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/fetch2') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index bd23533ebc..7afb2aeb73 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf