summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Proxy.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-04-25 19:15:37 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-04-25 19:15:37 +0000
commit055dd056560b7b05ec7c1e2e9d0c5dd699e4e71a (patch)
tree99d697fc281ab2522ed864521ad7b1f460778055 /src/lib/Client/Proxy.py
parentc81c76cbaf533513761915a9f7bba8f3bab1487f (diff)
downloadbcfg2-055dd056560b7b05ec7c1e2e9d0c5dd699e4e71a.tar.gz
bcfg2-055dd056560b7b05ec7c1e2e9d0c5dd699e4e71a.tar.bz2
bcfg2-055dd056560b7b05ec7c1e2e9d0c5dd699e4e71a.zip
add better error handling for ssl negotiation errors
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1848 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Proxy.py')
-rw-r--r--src/lib/Client/Proxy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Client/Proxy.py b/src/lib/Client/Proxy.py
index 3bd4e404d..8ea28cc9c 100644
--- a/src/lib/Client/Proxy.py
+++ b/src/lib/Client/Proxy.py
@@ -56,13 +56,16 @@ class SafeProxy:
except xmlrpclib.Fault:
self.log.debug("Operation %s completed with fault" % (methodName))
raise
+ except socket.sslerror:
+ self.log.error("Attempt %d of %d failed due to SSL negotiation failure" %
+ ((irs + 1), self._retries))
except socket.error, serr:
self.log.debug("Attempting %s (%d of %d) failed because %s" % (methodName, (irs+1),
self._retries, serr))
- time.sleep(0.5)
except:
self.log.error("Unknown failure", exc_info=1)
break
+ time.sleep(0.5)
self.log.error("%s failed:\nCould not connect to %s" % (methodName, self.component))
raise xmlrpclib.Fault(20, "Server Failure")