From 99d3aac6d11474dd68176396f3c8468b4245906c Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 17 Jun 2001 13:42:34 +0000 Subject: [PATCH] Adapted for the two GrampsParsers svn: r153 --- src/ReadXML.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ReadXML.py b/src/ReadXML.py index bad2be0e1..a66c009c5 100644 --- a/src/ReadXML.py +++ b/src/ReadXML.py @@ -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() -