gnome-games r7655 - trunk/glchess/src/lib
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7655 - trunk/glchess/src/lib
- Date: Wed, 14 May 2008 12:59:30 +0100 (BST)
Author: rancell
Date: Wed May 14 11:59:30 2008
New Revision: 7655
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7655&view=rev
Log:
bug handling empty history
Modified:
trunk/glchess/src/lib/history.py
Modified: trunk/glchess/src/lib/history.py
==============================================================================
--- trunk/glchess/src/lib/history.py (original)
+++ trunk/glchess/src/lib/history.py Wed May 14 11:59:30 2008
@@ -24,6 +24,7 @@
"""
g = None
fileName = None
+ inHistory = False
try:
f = file(UNFINISHED_FILE, 'r')
lines = f.readlines()
@@ -43,6 +44,7 @@
result = p[0].getTag(chess.pgn.TAG_RESULT)
if result == chess.pgn.RESULT_INCOMPLETE:
g = p[0]
+ inHistory = fileName.startswith(HISTORY_DIR)
break
lines = lines[1:]
@@ -61,7 +63,6 @@
except IOError:
print 'Failed to write unfinished list'
- inHistory = fileName.startswith(HISTORY_DIR)
return (g, fileName, inHistory)
def load(self, date):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]