projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24a0941
)
Fix Issue8194 - Fix incompatible API change in the parse_respones for xmlrpclib.
author
Senthil Kumaran
<orsenthil@gmail.com>
Wed, 8 Dec 2010 08:04:49 +0000
(08:04 +0000)
committer
Senthil Kumaran
<orsenthil@gmail.com>
Wed, 8 Dec 2010 08:04:49 +0000
(08:04 +0000)
Lib/xmlrpc/client.py
patch
|
blob
|
history
diff --git
a/Lib/xmlrpc/client.py
b/Lib/xmlrpc/client.py
index 4de4c2b27dc429aec86bfd0128c3957f6a7983a3..19d4d6986fc3ffca4654b7a7e287a8b2ad217757 100644
(file)
--- a/
Lib/xmlrpc/client.py
+++ b/
Lib/xmlrpc/client.py
@@
-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