mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
e9967d9ed8
commit
ef4c613ac1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user