Adapted for the two GrampsParsers
svn: r153
This commit is contained in:
parent
2cb954878f
commit
99d3aac6d1
@ -64,12 +64,12 @@ def importData(database, filename, callback):
|
||||
|
||||
if sax == 1:
|
||||
parser = xml.sax.saxexts.make_parser()
|
||||
parser.setDocumentHandler(GrampsParser(database,callback,basefile,1))
|
||||
parser.setDocumentHandler(GrampsImportParser(database,callback,basefile))
|
||||
parser.setErrorHandler(xml.sax.saxutils.ErrorRaiser())
|
||||
|
||||
else:
|
||||
parser = xml.sax.make_parser()
|
||||
parser.setContentHandler(GrampsParser(database,callback,basefile,1))
|
||||
parser.setContentHandler(GrampsImportParser(database,callback,basefile))
|
||||
|
||||
try:
|
||||
xml_file = gzip.open(filename,"rb")
|
||||
@ -120,11 +120,11 @@ def loadData(database, filename, callback):
|
||||
|
||||
if sax == 1:
|
||||
parser = xml.sax.saxexts.make_parser()
|
||||
parser.setDocumentHandler(GrampsParser(database,callback,basefile,0))
|
||||
parser.setDocumentHandler(GrampsParser(database,callback,basefile))
|
||||
parser.setErrorHandler(xml.sax.saxutils.ErrorRaiser())
|
||||
else:
|
||||
parser = xml.sax.make_parser()
|
||||
parser.setContentHandler(GrampsParser(database,callback,basefile,0))
|
||||
parser.setContentHandler(GrampsParser(database,callback,basefile))
|
||||
|
||||
try:
|
||||
xml_file = gzip.open(filename,"rb")
|
||||
@ -178,9 +178,6 @@ if __name__ == "__main__":
|
||||
t2 = time.time()
|
||||
print t2 - t1
|
||||
|
||||
for person in db.getPersonMap().values():
|
||||
print person.getPrimaryName().getName()
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user