Get around the junk at the beginning of a PAF file file

svn: r253
This commit is contained in:
Don Allingham 2001-07-17 12:39:56 +00:00
parent c7d4701f5b
commit 711439fa8f

View File

@ -65,6 +65,7 @@ for val in const.familyConstantEvents.keys():
ged2fam[key] = val
lineRE = re.compile(r"\s*(\d+)\s+(\S+)\s*(.*)$")
headRE = re.compile(r"\s*(\d+)\s+HEAD")
nameRegexp = re.compile(r"([\S\s]*\S)?\s*/([^/]+)?/\s*,?\s*([\S]+)?")
#-------------------------------------------------------------------------
@ -1118,8 +1119,11 @@ class GedcomParser:
#
#---------------------------------------------------------------------
def parse_header_head(self):
matches = self.get_next()
line = string.replace(self.lines[self.index],'\r','')
match = headRE.match(line)
if not match:
raise GedcomParser.SyntaxError, self.lines[self.index]
self.index = self.index + 1
if matches[1] != "HEAD":
self.barf(0)