diff options
| author | Ross Burton <ross.burton@intel.com> | 2017-11-03 12:38:45 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-21 13:06:45 +0000 |
| commit | ef4c613ac1c9c9ec9c717a449152640e6f43e85c (patch) | |
| tree | 03a1dcb30652fd4f45117cd103d5ce88d90ff4ab /bitbake/lib/bb | |
| parent | e9967d9ed804365d66433b1ac6185ada0d1c5b77 (diff) | |
| download | poky-ef4c613ac1c9c9ec9c717a449152640e6f43e85c.tar.gz | |
bitbake: fetch/wget: use with to ensure the response is closed
(Bitbake rev: 8c487176d311557031cedba76185f14f0e7a14cd)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
| -rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index c83eba3b93..8f505b6de9 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
| @@ -333,7 +333,8 @@ class Wget(FetchMethod): | |||
| 333 | except (TypeError, ImportError, IOError, netrc.NetrcParseError): | 333 | except (TypeError, ImportError, IOError, netrc.NetrcParseError): |
| 334 | pass | 334 | pass |
| 335 | 335 | ||
| 336 | opener.open(r) | 336 | with opener.open(r) as response: |
| 337 | pass | ||
| 337 | except urllib.error.URLError as e: | 338 | except urllib.error.URLError as e: |
| 338 | if try_again: | 339 | if try_again: |
| 339 | logger.debug(2, "checkstatus: trying again") | 340 | logger.debug(2, "checkstatus: trying again") |
