bitbake: fetch2/wget: Remove buffering parameter

The buffering parameter was removed in python 3.1 and made default
so we can clean up the code. This removes weird looking double
exceptions when connections fail.

(Bitbake rev: 06b7bafbd18a47c8db2f7b943dc535c65df176bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2020-08-22 08:44:41 +01:00
parent 7970db3997
commit e4df6ef7f5

View File

@@ -208,10 +208,7 @@ class Wget(FetchMethod):
fetch.connection_cache.remove_connection(h.host, h.port)
raise urllib.error.URLError(err)
else:
try:
r = h.getresponse(buffering=True)
except TypeError: # buffering kw not supported
r = h.getresponse()
r = h.getresponse()
# Pick apart the HTTPResponse object to get the addinfourl
# object initialized properly.