summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-20 16:14:37 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-20 16:14:37 +0000
commit4b97e7a29cf4cf71cd1460061cfc04d76c4cf3f0 (patch)
tree6f195850612090a378e66911752e38e7d6b25072 /src
parentbb46d39030b25543b06a0a9c455e2dcf12626a2a (diff)
downloadbcfg2-4b97e7a29cf4cf71cd1460061cfc04d76c4cf3f0.tar.gz
bcfg2-4b97e7a29cf4cf71cd1460061cfc04d76c4cf3f0.tar.bz2
bcfg2-4b97e7a29cf4cf71cd1460061cfc04d76c4cf3f0.zip
Improve component error handling
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2951 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Component.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/Server/Component.py b/src/lib/Server/Component.py
index 20423fa51..217f6414b 100644
--- a/src/lib/Server/Component.py
+++ b/src/lib/Server/Component.py
@@ -33,15 +33,18 @@ class CobaltXMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
self.end_headers()
else:
# got a valid XML RPC response
- self.send_response(200)
- self.send_header("Content-type", "text/xml")
- self.send_header("Content-length", str(len(response)))
- self.end_headers()
- self.wfile.write(response)
-
- # shut down the connection
- self.wfile.flush()
- #self.connection.shutdown()
+ try:
+ self.send_response(200)
+ self.send_header("Content-type", "text/xml")
+ self.send_header("Content-length", str(len(response)))
+ self.end_headers()
+ self.wfile.write(response)
+
+ # shut down the connection
+ self.wfile.flush()
+ #self.connection.shutdown()
+ except socket.error:
+ pass
def setup(self):
'''Setup a working connection'''