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
Trying to fix bug with fifo and network players
[progcomp2013.git]
/
qchess
/
qchess.py
diff --git
a/qchess/qchess.py
b/qchess/qchess.py
index
da4cab7
..
1dd8691
100755
(executable)
--- a/
qchess/qchess.py
+++ b/
qchess/qchess.py
@@
-722,7
+722,15
@@
class FifoPlayer(Player):
Player.__init__(self, name, colour)
os.mkfifo(self.name+".in")
os.mkfifo(self.name+".out")
Player.__init__(self, name, colour)
os.mkfifo(self.name+".in")
os.mkfifo(self.name+".out")
-
+
+ try:
+ self.fifo_out = open_fifo(self.name+".out","w", FifoPlayer.timeout)
+ except:
+ raise Exception("FIFO_TIMEOUT")
+ else:
+ self.fifo_out.write("START "+colour+"\n")
+ self.fifo_out.close()
+
@@
-2995,4
+3003,4
@@
if __name__ == "__main__":
# --- main.py --- #
# --- main.py --- #
-# EOF - created from make on
Thursday 20 June 18:09:07
WST 2013
+# EOF - created from make on
Friday 21 June 18:15:14
WST 2013
UCC
git Repository :: git.ucc.asn.au