From aa1c1a6286feb97809fdb2aec206bc8cb3390cda Mon Sep 17 00:00:00 2001 From: James G Sack Date: Thu, 29 Nov 2007 03:00:07 +0000 Subject: [PATCH] forward port 2.2.x #1394 fix preemptively svn: r9427 --- ChangeLog | 6 ++++++ src/GrampsDbUtils/_GedcomLex.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index aae837086..a2400506a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-11-28 Jim Sack + * src/GrampsDb/_ReadGedcom.py : remove trail whitespace (readahead) + fixes (possible) discarded reference due to bogus handles that get created + when the reference looks like "@REF_ID@ " (note space after) + This is a forward-port of the 2.2.x fix for issue #1399 + 2007-11-28 Douglas S. Blank * src/ReportBase/Makefile.am: removed _MenuOptions.py * src/PluginUtils/Makefile.am: added _MenuOptions.py diff --git a/src/GrampsDbUtils/_GedcomLex.py b/src/GrampsDbUtils/_GedcomLex.py index 77d7de844..84c2f9838 100644 --- a/src/GrampsDbUtils/_GedcomLex.py +++ b/src/GrampsDbUtils/_GedcomLex.py @@ -360,7 +360,8 @@ class Reader: return try: - line = line.strip('\n\r').split(None, 2) + [''] + # the space ensures no trailing whitespace on last parm + line = line.strip(' \n\r').split(None, 2) + [''] level = int(line[0]) except: continue