From aceb486b79737ac9b7ef6c5e4d53b95bae2ebdbf Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 2 Jun 2005 20:06:37 +0000 Subject: [PATCH] * src/ReadGedcom.py (get_next): Use single space to split the line into level, tag, and the field contents; strip extra white space off the tag name. svn: r4758 --- gramps2/ChangeLog | 5 +++++ gramps2/src/ReadGedcom.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 6aa4e3ca6..f350f20ba 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-06-02 Alex Roitman + * src/ReadGedcom.py (get_next): Use single space to split the line + into level, tag, and the field contents; strip extra white space + off the tag name. + 2005-06-01 Martin Hawlisch * src/Utils.py (probably_alive): If no year is given it now treats people as dead when they have a death event instead of counting them diff --git a/gramps2/src/ReadGedcom.py b/gramps2/src/ReadGedcom.py index 3c570b67a..2e7cb5de1 100644 --- a/gramps2/src/ReadGedcom.py +++ b/gramps2/src/ReadGedcom.py @@ -434,13 +434,13 @@ class GedcomParser: self.text = string.translate(self.text,self.transtable2) self.index += 1 - l = self.text.split(None, 2) + l = self.text.split(' ', 2) ln = len(l) try: if ln == 2: - self.groups = (int(l[0]),unicode(l[1]),u"") + self.groups = (int(l[0]),unicode(l[1]).strip(),u"") else: - self.groups = (int(l[0]),unicode(l[1]),unicode(l[2])) + self.groups = (int(l[0]),unicode(l[1]).strip(),unicode(l[2])) except: if self.text == "": msg = _("Warning: line %d was blank, so it was ignored.\n") % self.index