From b43699d1f4e38446688dc626743cb4495421ed6f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Sun, 20 Dec 2009 15:56:15 +0000 Subject: Proxy: transport errors more gracefully (Fixes #803, at least on the client side) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5626 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Proxy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/Proxy.py b/src/lib/Proxy.py index e24a70aec..788cfde0f 100644 --- a/src/lib/Proxy.py +++ b/src/lib/Proxy.py @@ -265,13 +265,12 @@ class XMLRPCTransport(xmlrpclib.Transport): self.send_content(h, request_body) errcode, errmsg, headers = h.getreply() - msglen = int(headers.dict['content-length']) if errcode != 200: raise xmlrpclib.ProtocolError(host + handler, errcode, errmsg, headers) self.verbose = verbose - + msglen = int(headers.dict['content-length']) return self._get_response(h.getfile(), msglen) def _get_response(self, fd, length): -- cgit v1.2.3-1-g7c22