gnome-games r7654 - branches/gnome-2-22/glchess/src/lib
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7654 - branches/gnome-2-22/glchess/src/lib
- Date: Wed, 14 May 2008 12:59:11 +0100 (BST)
Author: rancell
Date: Wed May 14 11:59:11 2008
New Revision: 7654
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7654&view=rev
Log:
bug handling empty history
Modified:
branches/gnome-2-22/glchess/src/lib/history.py
Modified: branches/gnome-2-22/glchess/src/lib/history.py
==============================================================================
--- branches/gnome-2-22/glchess/src/lib/history.py (original)
+++ branches/gnome-2-22/glchess/src/lib/history.py Wed May 14 11:59:11 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]