2007-05-22 Don Allingham <don@gramps-project.org>

* src/DataViews/_PedigreeView.py (PedigreeView.find_tree): Catch recursion error



svn: r8508
This commit is contained in:
Don Allingham 2007-05-23 04:22:52 +00:00
parent 494c3ba03f
commit 59713402ac
4 changed files with 20 additions and 14 deletions

View File

@ -1,3 +1,6 @@
2007-05-22 Don Allingham <don@gramps-project.org>
* src/DataViews/_PedigreeView.py (PedigreeView.find_tree): Catch recursion error
2007-05-18 Brian Matherly <brian@gramps-project.org> 2007-05-18 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: fix gallery image links generated on Win32 * src/plugins/NarrativeWeb.py: fix gallery image links generated on Win32

View File

@ -4,15 +4,15 @@ dnl Process this file with autoconf to produce a configure script.
dnl May need to run automake && aclocal first dnl May need to run automake && aclocal first
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT(gramps, 2.2.7, [gramps-bugs@lists.sourceforge.net]) AC_INIT(gramps, 2.2.8, [gramps-bugs@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.in) AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE(1.6.3) AM_INIT_AUTOMAKE(1.6.3)
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
GNOME_DOC_INIT GNOME_DOC_INIT
dnl RELEASE=0.SVN$(svnversion -n .) RELEASE=0.SVN$(svnversion -n .)
RELEASE=1 dnl RELEASE=1
VERSIONSTRING=$VERSION VERSIONSTRING=$VERSION
if test x"$RELEASE" != "x" if test x"$RELEASE" != "x"

View File

@ -61,7 +61,7 @@ from Editors import EditPerson, EditFamily
from DdTargets import DdTargets from DdTargets import DdTargets
import cPickle as pickle import cPickle as pickle
from QuestionDialog import RunDatabaseRepair from QuestionDialog import RunDatabaseRepair, ErrorDialog
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -1265,7 +1265,12 @@ class PedigreeView(PageView.PersonNavView):
if depth > 5 or person == None: if depth > 5 or person == None:
return return
alive = Utils.probably_alive(person, self.dbstate.db) try:
alive = Utils.probably_alive(person, self.dbstate.db)
except RuntimeError:
ErrorDialog(_('Relationship loop detected'),
_('A person was found to be his/her own ancestor.'))
alive = False
lst[index] = (person,val,None,alive) lst[index] = (person,val,None,alive)

View File

@ -446,25 +446,23 @@ class DbLoader:
os.chdir(os.path.dirname(filename)) os.chdir(os.path.dirname(filename))
except: except:
print "could not change directory" print "could not change directory"
except (DBAccessError, DBPageNotFoundError, except DBRunRecoveryError, msg:
DBInvalidArgError, DBRunRecoveryError), msg:
QuestionDialog.ErrorDialog( QuestionDialog.ErrorDialog(
_("Low level database corruption detected"), _("Low level database corruption detected"),
_("GRAMPS has detected a problem in the underlying " _("GRAMPS has detected a problem in the underlying "
"Berkeley database. <b>If you have renamed this file, " "Berkeley database. Please exit the program, and GRAMPS "
"change the name back to its original name. If you have "
"copied the file from another machine, this file is not "
"usable</b>. Export your data to XML on the original machine "
"and import it into a new database.\n\nOtherwise, "
"please exit the program, and GRAMPS "
"will attempt to run the recovery repair operation " "will attempt to run the recovery repair operation "
"the next time you open this database. If this " "the next time you open this database. If this "
"problem persists, create a new database, import " "problem persists, create a new database, import "
"from a backup database, and report the problem to " "from a backup database, and report the problem to "
"gramps-bugs@lists.sourceforge.net.")) "gramps-bugs@lists.sourceforge.net."))
except (DBAccessError, DBPageNotFoundError,DBInvalidArgError), msg:
QuestionDialog.ErrorDialog(
_("Could not open file: %s") % filename,
str(msg[1]))
except Exception, msg: except Exception, msg:
QuestionDialog.ErrorDialog( QuestionDialog.ErrorDialog(
_("Could not open file: %s") % filename, msg ) _("Could not open file: %s") % filename, msg )
return True return True
def open_saved_as(self, filename, filetype): def open_saved_as(self, filename, filetype):