[PATCH 2/3] CTS: handle socket exceptions better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
---
 cts/corosync.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/cts/corosync.py b/cts/corosync.py
index 89b0808..b8c4edb 100644
--- a/cts/corosync.py
+++ b/cts/corosync.py
@@ -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
-- 
1.7.7.5

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux