From fafacb096f16e037f7aea6ed9f8d8bbb19a03822 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 25 May 2007 03:50:01 +0000 Subject: [PATCH] 2007-05-24 Don Allingham * src/Simple/Makefile.am: added * src/DataViews/_PedigreeView.py: catch loop in relationships, indicated by a recursion limit exception. svn: r8517 --- ChangeLog | 5 +++++ src/DataViews/_PedigreeView.py | 9 +++++++-- src/Simple/Makefile.am | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/Simple/Makefile.am diff --git a/ChangeLog b/ChangeLog index ad02b2798..136a618ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-24 Don Allingham + * src/Simple/Makefile.am: added + * src/DataViews/_PedigreeView.py: catch loop in relationships, + indicated by a recursion limit exception. + 2007-05-20 Don Allingham * configure.in: update Simple/Makefile * src/Simple/_SimpleAccess.py: Move to Simple package diff --git a/src/DataViews/_PedigreeView.py b/src/DataViews/_PedigreeView.py index 60ce1c2e0..e691e63aa 100644 --- a/src/DataViews/_PedigreeView.py +++ b/src/DataViews/_PedigreeView.py @@ -61,7 +61,7 @@ from Editors import EditPerson, EditFamily from DdTargets import DdTargets import cPickle as pickle -from QuestionDialog import RunDatabaseRepair +from QuestionDialog import RunDatabaseRepair, ErrorDialog #------------------------------------------------------------------------- # @@ -1246,7 +1246,12 @@ class PedigreeView(PageView.PersonNavView): if depth > 5 or person == None: 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) diff --git a/src/Simple/Makefile.am b/src/Simple/Makefile.am new file mode 100644 index 000000000..94b629405 --- /dev/null +++ b/src/Simple/Makefile.am @@ -0,0 +1,20 @@ +# This is the src/Report level Makefile for Gramps + +pkgdatadir = $(datadir)/@PACKAGE@/Simple + +pkgdata_PYTHON = \ + _SimpleDoc.py\ + _SimpleAccess.py\ + __init__.py + +pkgpyexecdir = @pkgpyexecdir@/Simple +pkgpythondir = @pkgpythondir@/Simple + +# Clean up all the byte-compiled files +MOSTLYCLEANFILES = *pyc *pyo + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON));