[oe-commits] [bitbake] 02/02: fetch/wget: use with to ensure the response is closed
git at git.openembedded.org
git at git.openembedded.org
Tue Nov 21 13:13:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository bitbake.
commit 8c487176d311557031cedba76185f14f0e7a14cd
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Nov 3 12:38:45 2017 +0000
fetch/wget: use with to ensure the response is closed
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/fetch2/wget.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index c83eba3..8f505b6 100644
--- a/lib/bb/fetch2/wget.py
+++ b/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")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list