summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-12-20 15:56:15 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-12-20 15:56:15 +0000
commitb43699d1f4e38446688dc626743cb4495421ed6f (patch)
treeef16fc911a3fd780aaecf63ae7a2445117971598
parentb1eef95d3d00595afc53ac0f56c6627cf04fb2c8 (diff)
downloadbcfg2-b43699d1f4e38446688dc626743cb4495421ed6f.tar.gz
bcfg2-b43699d1f4e38446688dc626743cb4495421ed6f.tar.bz2
bcfg2-b43699d1f4e38446688dc626743cb4495421ed6f.zip
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
-rw-r--r--src/lib/Proxy.py3
1 files changed, 1 insertions, 2 deletions
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):