summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-23 14:18:31 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-23 14:18:31 +0000
commit820b2a677475e26aa29a23cd9c4eadcaf4ec4730 (patch)
treed4967f03a48386d5700329f6eb1fa0e37b7a6d43 /src/lib
parentc44c69fc0d288c4674ddef02d25b10ecb461385b (diff)
downloadbcfg2-820b2a677475e26aa29a23cd9c4eadcaf4ec4730.tar.gz
bcfg2-820b2a677475e26aa29a23cd9c4eadcaf4ec4730.tar.bz2
bcfg2-820b2a677475e26aa29a23cd9c4eadcaf4ec4730.zip
Fixup server error handling
* Remove ssl key print * Handle bind failure case cleanly git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2533 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Component.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Server/Component.py b/src/lib/Server/Component.py
index f3bd47d34..ecb476780 100644
--- a/src/lib/Server/Component.py
+++ b/src/lib/Server/Component.py
@@ -53,7 +53,6 @@ class SSLServer(BaseHTTPServer.HTTPServer):
def __init__(self, address, keyfile, handler):
SocketServer.BaseServer.__init__(self, address, handler)
ctxt = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
- print keyfile
ctxt.use_privatekey_file (keyfile)
ctxt.use_certificate_file(keyfile)
#ctxt.load_verify_locations('/tmp/keys/CA.cert')
@@ -134,6 +133,9 @@ class Component(SSLServer,
try:
SSLServer.__init__(self, location, keyfile, CobaltXMLRPCRequestHandler)
+ except socket.error:
+ self.logger.error("Failed to bind to socket")
+ raise ComponentInitError
except:
self.logger.error("Failed to load ssl key %s" % (keyfile), exc_info=1)
raise ComponentInitError