From 57352d91b63e62f51eb6c7e4c3c36eccfe75707a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 17 Jul 2001 12:47:26 +0000 Subject: [PATCH] Fix PAF5.1 leading garbage svn: r254 --- gramps/src/plugins/ReadGedcom.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index efe944e5a..d653f58eb 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/src/plugins/ReadGedcom.py @@ -165,6 +165,7 @@ class DateStruct: class GedcomParser: SyntaxError = "Syntax Error" + BadFile = "Not a GEDCOM file" #--------------------------------------------------------------------- # @@ -1120,12 +1121,10 @@ class GedcomParser: #--------------------------------------------------------------------- def parse_header_head(self): line = string.replace(self.lines[self.index],'\r','') - match = headRE.match(line) + match = headRE.search(line) if not match: - raise GedcomParser.SyntaxError, self.lines[self.index] + raise GedcomParser.BadFile, self.lines[self.index] self.index = self.index + 1 - if matches[1] != "HEAD": - self.barf(0) #--------------------------------------------------------------------- #