mirror of https://github.com/python/cpython
Fix Issue8194 - Fix incompatible API change in the parse_respones for xmlrpclib.
This commit is contained in:
parent
705e8d882f
commit
d8e4edd5d2
|
@ -1446,8 +1446,13 @@ class Transport:
|
||||||
|
|
||||||
def parse_response(self, response):
|
def parse_response(self, response):
|
||||||
# read response data from httpresponse, and parse it
|
# read response data from httpresponse, and parse it
|
||||||
if response.getheader("Content-Encoding", "") == "gzip":
|
|
||||||
stream = GzipDecodedResponse(response)
|
# Check for new http response object, else it is a file object
|
||||||
|
if hasattr(response,'getheader'):
|
||||||
|
if response.getheader("Content-Encoding", "") == "gzip":
|
||||||
|
stream = GzipDecodedResponse(response)
|
||||||
|
else:
|
||||||
|
stream = response
|
||||||
else:
|
else:
|
||||||
stream = response
|
stream = response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue