]> git.proxmox.com Git - mirror_corosync.git/commitdiff
CTS: handle socket exceptions better
authorAngus Salkeld <asalkeld@redhat.com>
Tue, 24 Jan 2012 23:56:26 +0000 (10:56 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Fri, 27 Jan 2012 06:41:21 +0000 (17:41 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
cts/corosync.py

index 89b080887ff950f2173f9d3e26726132356ddaa4..b8c4edbf0d870acf593f0698a20e2a158d9b41ed 100644 (file)
@@ -558,7 +558,11 @@ class TestAgent(object):
 
     def read (self):
 
-        msg = self.sock.recv (4096)
+        try:
+            msg = self.sock.recv (4096)
+        except socket.error, msg:
+            raise RuntimeError(msg)
+
         if msg == '':
             raise RuntimeError("socket connection broken")
         return msg