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

[minion-cvs] Beautify socket errors a bit



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv10942/lib/mixminion

Modified Files:
	ClientMain.py 
Log Message:
Beautify socket errors a bit

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ClientMain.py	6 Jan 2003 11:22:41 -0000	1.32
+++ ClientMain.py	6 Jan 2003 12:41:49 -0000	1.33
@@ -843,10 +843,13 @@
                                                             server.getPort(),
                                                             server.getKeyID())
         try:
-            con.connect()
-            LOG.info("Sending packet(s)")
-            for msg in msgList:
-                con.sendPacket(msg)
+            try:
+                con.connect()
+                LOG.info("Sending packet(s)")
+                for msg in msgList:
+                    con.sendPacket(msg)
+            except socket.error, e:
+                raise MixError("Error sending packets: %s" % e)
         finally:
             con.shutdown()