1
Index: gnome-games-2.26.0/gnome-sudoku/src/lib/saver.py
2
===================================================================
3
--- gnome-games-2.26.0/gnome-sudoku/src/lib/saver.py 2009/03/28 00:47:14 8910
4
+++ gnome-games-2.26.0/gnome-sudoku/src/lib/saver.py 2009/03/28 02:05:39 8911
7
print 'Warning: could not read file',f
9
- jar['saved_at']=os.stat(f)[8]
11
+ if self.is_valid(jar):
12
+ jar['saved_at']=os.stat(f)[8]
15
+ print 'Warning: malformed save game',f
19
+ def is_valid (self, jar):
20
+ virgin = jar['game'].split('\n')[0].replace(' ','')
21
+ played = jar['game'].split('\n')[1].replace(' ','')
23
+ if len(virgin) != 81 or len(played) != 81:
26
+ if not virgin.isdigit() or not played.isdigit():