From 67b3f3c0c950d9dd1319538c9dcb5f95016283b4 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 --- gramps/src/ReadXML.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gramps/src/ReadXML.py b/gramps/src/ReadXML.py index bad2be0e1..a66c009c5 100644 --- a/gramps/src/ReadXML.py +++ b/gramps/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() -