* src/GrampsCfg.py: Add comment about SUSE naming of gconf

* src/Relationship.py: detect a RuntimeError exception that occurs
when we exceed the recursion depth limit. This occurs when a
relationship loop is detected
* src/gramps_main.py: handle relationship loop message


svn: r2355
This commit is contained in:
Don Allingham 2003-11-20 04:18:10 +00:00
parent 1ab08c6514
commit b28d22243a
3 changed files with 13 additions and 4 deletions

View File

@ -42,6 +42,9 @@ import gtk.glade
import gnome import gnome
import gnome.ui import gnome.ui
#
# SUSE calls the gconf module "gnome.gconf"
#
try: try:
import gconf import gconf
except ImportError: except ImportError:

View File

@ -218,8 +218,11 @@ def get_relationship(orig_person,other_person):
if is_spouse(orig_person,other_person): if is_spouse(orig_person,other_person):
return ("spouse",[]) return ("spouse",[])
try:
apply_filter(orig_person,0,firstList,firstMap) apply_filter(orig_person,0,firstList,firstMap)
apply_filter(other_person,0,secondList,secondMap) apply_filter(other_person,0,secondList,secondMap)
except RuntimeError,msg:
return (_("Relationship loop detected"),None)
for person in firstList: for person in firstList:
if person in secondList: if person in secondList:

View File

@ -1366,6 +1366,9 @@ class Gramps:
self.active_person) self.active_person)
if name: if name:
if plist == None:
return name
else:
return _("%(relationship)s of %(person)s") % { return _("%(relationship)s of %(person)s") % {
'relationship' : name, 'person' : pname } 'relationship' : name, 'person' : pname }
else: else: