Bug 1405325 - Assign actual response to variable. r=maja_zf
This is a non-functional change, but if anything should be assigned
to the "response" value, it should be the actual response. I had
to do this because I was debugging a low-level HTTP problem with
geckodriver, so this will be more useful in the future. In any case,
we can return the webdriver.transport.Response representation directly
because the finally clause is always called.
MozReview-Commit-ID: 8JKNKAEbOAe
--- a/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/transport.py
@@ -95,13 +95,12 @@ class HTTPWireProtocol(object):
if self._timeout is not None:
kwargs["timeout"] = self._timeout
conn = httplib.HTTPConnection(
self.host, self.port, strict=True, **kwargs)
conn.request(method, url, body, headers)
try:
- response = Response.from_http_response(conn.getresponse())
+ response = conn.getresponse()
+ return Response.from_http_response(response)
finally:
conn.close()
-
- return response