* 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
This commit is contained in:
Alex Roitman 2005-06-02 20:06:37 +00:00
parent 85fa8c09ea
commit aceb486b79
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-06-02 Alex Roitman <shura@gramps-project.org>
* 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 <Martin.Hawlisch@gmx.de> 2005-06-01 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/Utils.py (probably_alive): If no year is given it now treats * 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 people as dead when they have a death event instead of counting them

View File

@ -434,13 +434,13 @@ class GedcomParser:
self.text = string.translate(self.text,self.transtable2) self.text = string.translate(self.text,self.transtable2)
self.index += 1 self.index += 1
l = self.text.split(None, 2) l = self.text.split(' ', 2)
ln = len(l) ln = len(l)
try: try:
if ln == 2: if ln == 2:
self.groups = (int(l[0]),unicode(l[1]),u"") self.groups = (int(l[0]),unicode(l[1]).strip(),u"")
else: 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: except:
if self.text == "": if self.text == "":
msg = _("Warning: line %d was blank, so it was ignored.\n") % self.index msg = _("Warning: line %d was blank, so it was ignored.\n") % self.index