EncodedFile no longer used

svn: r116
This commit is contained in:
Don Allingham 2001-06-12 17:04:03 +00:00
parent 731d836bd2
commit 8b1c368513

View File

@ -67,7 +67,6 @@ def importData(database, filename, callback):
parser = xml.sax.make_parser() parser = xml.sax.make_parser()
parser.setContentHandler(GrampsParser(database,callback,basefile,1)) parser.setContentHandler(GrampsParser(database,callback,basefile,1))
xml_file = gzip.open(filename,"rb") xml_file = gzip.open(filename,"rb")
# xml_file = EncodedFile(gzip.open(filename,"rb"),'utf-8','latin-1')
parser.parse(xml_file) parser.parse(xml_file)
xml_file.close() xml_file.close()
@ -96,10 +95,7 @@ def loadData(database, filename, callback):
parser.setContentHandler(GrampsParser(database,callback,basefile,0)) parser.setContentHandler(GrampsParser(database,callback,basefile,0))
try: try:
if sax == 1:
xml_file = gzip.open(filename,"rb") xml_file = gzip.open(filename,"rb")
else:
xml_file = EncodedFile(gzip.open(filename,"rb"),'utf-8','latin-1')
except IOError,msg: except IOError,msg:
GnomeErrorDialog(_("%s could not be opened\n") % filename + str(msg)) GnomeErrorDialog(_("%s could not be opened\n") % filename + str(msg))
return 0 return 0