gnome-games r8271 - branches/gnome-2-24/gnome-sudoku/src/lib
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8271 - branches/gnome-2-24/gnome-sudoku/src/lib
- Date: Thu, 6 Nov 2008 12:53:54 +0000 (UTC)
Author: rancell
Date: Thu Nov 6 12:53:53 2008
New Revision: 8271
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8271&view=rev
Log:
Handle not being able to access save game directory (Bug #532937)
Modified:
branches/gnome-2-24/gnome-sudoku/src/lib/saver.py
Modified: branches/gnome-2-24/gnome-sudoku/src/lib/saver.py
==============================================================================
--- branches/gnome-2-24/gnome-sudoku/src/lib/saver.py (original)
+++ branches/gnome-2-24/gnome-sudoku/src/lib/saver.py Thu Nov 6 12:53:53 2008
@@ -117,11 +117,7 @@
_('Error %(errno)s: %(error)s')%{'errno':e.errno,
'error':e.strerror}
)
-
- def are_finished_games (self):
- if os.listdir(self.finished_path): return True
- else: return False
-
+
def game_from_ui (self, ui):
return ui.gsd.grid.virgin.to_string()
@@ -206,7 +202,10 @@
self.remove_from_saved_games(jar)
def list_saved_games (self):
- files = os.listdir(self.save_path)
+ try:
+ files = os.listdir(self.save_path)
+ except OSError, e:
+ files = []
games = []
for f in files:
f = os.path.join(self.save_path,f)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]