]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: fetch/wget: use with to ensure the response is closed
authorRoss Burton <ross.burton@intel.com>
Fri, 3 Nov 2017 12:38:45 +0000 (12:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Nov 2017 13:06:45 +0000 (13:06 +0000)
(Bitbake rev: 8c487176d311557031cedba76185f14f0e7a14cd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/wget.py

index c83eba3b93a08511e19bd17b9aa07b2d848b958a..8f505b6de95e9a3209f7bbb441d5ba0bd2192a09 100644 (file)
@@ -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")