* src/gramps_main.py (read_file): Optimize exception handling of load_database errors.

* src/ArgHandler.py (auto_save_load): Return actual status of read_file instead of always 1. This will now open the select database dialog on autoload errors.


svn: r4730
This commit is contained in:
Martin Hawlisch
2005-05-28 19:29:29 +00:00
parent 0cb7d90257
commit 01e6dedae9
3 changed files with 16 additions and 12 deletions

View File

@@ -1294,14 +1294,14 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
except ( IOError, OSError ), msg:
ErrorDialog(_('Cannot open database'),str(msg))
return 0
except db.DBAccessError, msg:
except (db.DBAccessError,db.DBError), msg:
ErrorDialog(_('Cannot open database'),
_('%s could not be opened.' % filename) + '\n' + msg[1])
except (db.DBError), msg:
ErrorDialog(_('Cannot open database'),
_('%s could not be opened.' % filename) + '\n' + msg[1])
gtk.main_quit()
return 0
except Exception:
DisplayTrace.DisplayTrace()
return 0
# Undo/Redo always start with standard labels and insensitive state
self.undo_callback(None)
self.redo_callback(None)