Fix bugs with FifoPlayer and Networking
[progcomp2013.git] / qchess / src / network.py
index b685037..a50a976 100644 (file)
@@ -149,9 +149,11 @@ class Network():
                if self.src in ready:
                        s = self.src.recv(1)
                else:
-                       raise Exception("UNRESPONSIVE")
+                       raise Exception("NET_UNRESPONSIVE")
 
 
+               debug("Network get_response s = " + str(s))
+
                while s[len(s)-1] != '\n':
                        # Timeout on each character in the message
                        if network_timeout_delay > 0.0:
@@ -161,7 +163,7 @@ class Network():
                        if self.src in ready:
                                s += self.src.recv(1) 
                        else:
-                               raise Exception("UNRESPONSIVE")
+                               raise Exception("NET_UNRESPONSIVE")
 
                
                return s.strip(" \r\n")
@@ -175,7 +177,7 @@ class Network():
                if self.src in ready:
                        self.src.send(s + "\n")
                else:
-                       raise Exception("UNRESPONSIVE")
+                       raise Exception("NET_UNRESPONSIVE")
                
                
 

UCC git Repository :: git.ucc.asn.au