Error message for missing SAX parser
svn: r428
This commit is contained in:
parent
c951eb32e6
commit
b3415b663a
@ -49,9 +49,9 @@ except:
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from xml.sax import make_parser, SAXParseException
|
from xml.sax import make_parser, SAXParseException, SAXReaderNotAvailable
|
||||||
except:
|
except:
|
||||||
from _xmlplus.sax import make_parser, SAXParseException
|
from _xmlplus.sax import make_parser, SAXParseException, SAXReaderNotAvailable
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -66,7 +66,14 @@ def importData(database, filename, callback):
|
|||||||
database.pmap = {}
|
database.pmap = {}
|
||||||
database.fmap = {}
|
database.fmap = {}
|
||||||
|
|
||||||
|
try:
|
||||||
parser = make_parser()
|
parser = make_parser()
|
||||||
|
except SAXReaderNotAvailable:
|
||||||
|
msg1 = _("GRAMPS is not able to find an XML parser on your system.")
|
||||||
|
msg2 = _("This is probably due to an incomplete python or PyXML installation")
|
||||||
|
GnomeErrorDialog("%s\n%s" % (msg1,msg2))
|
||||||
|
return
|
||||||
|
|
||||||
parser.setContentHandler(GrampsImportParser(database,callback,basefile))
|
parser.setContentHandler(GrampsImportParser(database,callback,basefile))
|
||||||
|
|
||||||
if gzip_ok:
|
if gzip_ok:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user