summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/wget.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 8bc9e93ca0..691942c9c2 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -104,7 +104,7 @@ class Wget(FetchMethod):
104 104
105 return True 105 return True
106 106
107 def checkstatus(self, fetch, ud, d): 107 def checkstatus(self, fetch, ud, d, try_again=True):
108 import urllib2, socket, httplib 108 import urllib2, socket, httplib
109 from urllib import addinfourl 109 from urllib import addinfourl
110 from bb.fetch2 import FetchConnectionCache 110 from bb.fetch2 import FetchConnectionCache
@@ -278,9 +278,13 @@ class Wget(FetchMethod):
278 r.get_method = lambda: "HEAD" 278 r.get_method = lambda: "HEAD"
279 opener.open(r) 279 opener.open(r)
280 except urllib2.URLError as e: 280 except urllib2.URLError as e:
281 # debug for now to avoid spamming the logs in e.g. remote sstate searches 281 if try_again:
282 logger.debug(2, "checkstatus() urlopen failed: %s" % e) 282 logger.debug(2, "checkstatus: trying again")
283 return False 283 return self.checkstatus(fetch, ud, d, False)
284 else:
285 # debug for now to avoid spamming the logs in e.g. remote sstate searches
286 logger.debug(2, "checkstatus() urlopen failed: %s" % e)
287 return False
284 return True 288 return True
285 289
286 def _parse_path(self, regex, s): 290 def _parse_path(self, regex, s):