diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 2e92117634..e8b1292433 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
| @@ -244,7 +244,12 @@ class Wget(FetchMethod): | |||
| 244 | fetch.connection_cache.remove_connection(h.host, h.port) | 244 | fetch.connection_cache.remove_connection(h.host, h.port) |
| 245 | raise urllib.error.URLError(err) | 245 | raise urllib.error.URLError(err) |
| 246 | else: | 246 | else: |
| 247 | r = h.getresponse() | 247 | try: |
| 248 | r = h.getresponse() | ||
| 249 | except TimeoutError as e: | ||
| 250 | if fetch.connection_cache: | ||
| 251 | fetch.connection_cache.remove_connection(h.host, h.port) | ||
| 252 | raise TimeoutError(e) | ||
| 248 | 253 | ||
| 249 | # Pick apart the HTTPResponse object to get the addinfourl | 254 | # Pick apart the HTTPResponse object to get the addinfourl |
| 250 | # object initialized properly. | 255 | # object initialized properly. |
