Fix PAF5.1 leading garbage
svn: r254
This commit is contained in:
parent
711439fa8f
commit
57352d91b6
@ -165,6 +165,7 @@ class DateStruct:
|
|||||||
class GedcomParser:
|
class GedcomParser:
|
||||||
|
|
||||||
SyntaxError = "Syntax Error"
|
SyntaxError = "Syntax Error"
|
||||||
|
BadFile = "Not a GEDCOM file"
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1120,12 +1121,10 @@ class GedcomParser:
|
|||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
def parse_header_head(self):
|
def parse_header_head(self):
|
||||||
line = string.replace(self.lines[self.index],'\r','')
|
line = string.replace(self.lines[self.index],'\r','')
|
||||||
match = headRE.match(line)
|
match = headRE.search(line)
|
||||||
if not match:
|
if not match:
|
||||||
raise GedcomParser.SyntaxError, self.lines[self.index]
|
raise GedcomParser.BadFile, self.lines[self.index]
|
||||||
self.index = self.index + 1
|
self.index = self.index + 1
|
||||||
if matches[1] != "HEAD":
|
|
||||||
self.barf(0)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user