From 5cd3411cfded3b62c91aa7ad6e63a06c2bcbb40c Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Thu, 21 Feb 2008 00:34:04 +0000 Subject: [PATCH] 2008-02-20 Raphael Ackermann * src/GrampsDbUtils/_GedcomUtils.py: (IdMapper.get_translate()) return value of dict instead of boolean. Fix #0001708 svn: r10084 --- ChangeLog | 4 ++++ src/GrampsDbUtils/_GedcomUtils.py | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44dad2f18..2121c1237 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-20 Raphael Ackermann + * src/GrampsDbUtils/_GedcomUtils.py: (IdMapper.get_translate()) return + value of dict instead of boolean. Fix #0001708 + 2008-02-20 Frederik De Richter * src/Merge/_MergePerson.py * src/Merge/_MergeSource.py diff --git a/src/GrampsDbUtils/_GedcomUtils.py b/src/GrampsDbUtils/_GedcomUtils.py index 4ab0997f5..1200a2256 100644 --- a/src/GrampsDbUtils/_GedcomUtils.py +++ b/src/GrampsDbUtils/_GedcomUtils.py @@ -35,11 +35,11 @@ SURNAME_RE = re.compile(r"/([^/]*)/([^/]*)") #------------------------------------------------------------------------- class CurrentState: """ - Keeps track of the current state variables + Keep track of the current state variables. """ def __init__(self, person=None, level=0, event=None, event_ref=None): """ - Initializes the object + Initialize the object. """ self.name_cnt = 0 self.person = person @@ -183,9 +183,8 @@ class IdMapper: def get_translate(self, gid): gid = self.clean(gid) - new_id = self.swap.has_key(gid) - if new_id: - return new_id + if self.swap.has_key(gid): + return self.swap[gid] else: if self.trans.get(str(gid)): new_val = self.find_next()