summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-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 d688fd9d02..6cb22aeee9 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 urllib.request, urllib.error, urllib.parse, socket, http.client 108 import urllib.request, urllib.error, urllib.parse, socket, http.client
109 from urllib.response import addinfourl 109 from urllib.response 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 urllib.error.URLError as e: 280 except urllib.error.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):