git.ucc.asn.au
/
progcomp2013.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bugs with FifoPlayer and Networking
[progcomp2013.git]
/
qchess
/
src
/
network.py
diff --git
a/qchess/src/network.py
b/qchess/src/network.py
index
b685037
..
a50a976
100644
(file)
--- a/
qchess/src/network.py
+++ b/
qchess/src/network.py
@@
-149,9
+149,11
@@
class Network():
if self.src in ready:
s = self.src.recv(1)
else:
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:
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:
if self.src in ready:
s += self.src.recv(1)
else:
- raise Exception("UNRESPONSIVE")
+ raise Exception("
NET_
UNRESPONSIVE")
return s.strip(" \r\n")
return s.strip(" \r\n")
@@
-175,7
+177,7
@@
class Network():
if self.src in ready:
self.src.send(s + "\n")
else:
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