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 | |
parent | e9967d9ed804365d66433b1ac6185ada0d1c5b77 (diff) | |
download | openembedded-core-contrib-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')
-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): except (TypeError, ImportError, IOError, netrc.NetrcParseError): pass - opener.open(r) + with opener.open(r) as response: + pass except urllib.error.URLError as e: if try_again: logger.debug(2, "checkstatus: trying again") |