Commit f34445f7 authored by Senthil Kumaran's avatar Senthil Kumaran

Fix Issue8194 - Fix incompatible API change in the parse_respones for xmlrpclib.

parent 24a0941a
......@@ -1297,8 +1297,12 @@ class Transport:
def parse_response(self, response):
# read response data from httpresponse, and parse it
if response.getheader("Content-Encoding", "") == "gzip":
stream = GzipDecodedResponse(response)
# Check for new http response object, otherwise it is a file object.
if hasattr(response, 'getheader'):
if response.getheader("Content-Encoding", "") == "gzip":
stream = GzipDecodedResponse(response)
else:
stream = response
else:
stream = response
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment