Skip to contentSkip to conversation

fetch2/wget: Remove buffering parameter

PATCH New Richard Purdie 1 participant 1 message Aug 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 lib/bb/fetch2/wget.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
lib/bb/fetch2/wget.py +1 -4
index f7d1de26b7..e6d9f528d0 100644
@@ -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.
Signature · 1 line
2.25.1