Skip to content

Commit 75ef674

Browse files
committed
validates gramps XML files for GEPS045
1 parent 12d43f1 commit 75ef674

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lxml/lxmlGramplet.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ def ReadXML(self, entry):
323323
doctype = tree.docinfo.doctype
324324
current = '<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.8.0//EN" "http://gramps-project.org/xml/1.8.0/grampsxml.dtd">'
325325
if self.RNGValidation(tree, rng) == True:
326-
#try:
327-
self.ParseXML(tree, filename)
328-
#except:
329-
#ErrorDialog(_('Parsing issue'), _('Cannot parse content of "%(file)s"') % {'file': filename})
330-
#LOG.error('Cannot parse the content of the XML copy')
331-
#return
326+
try:
327+
self.ParseXML(tree, filename)
328+
except:
329+
ErrorDialog(_('Parsing issue'), _('Cannot parse content of "%(file)s"') % {'file': filename})
330+
LOG.error('Cannot parse the content of the XML copy')
331+
return
332332
elif doctype != current:
333333
ErrorDialog(_('Gramps version'), _('Wrong namespace\nNeed: %s') % current)
334334
LOG.error('Namespace is wrong')
@@ -742,7 +742,7 @@ def __write_gallery(self, thumbs, mediapath):
742742

743743
LOG.info('Looking at gallery')
744744

745-
from gramps.gui.thumbnails import get_thumbnail_path
745+
from gramps.gen.utils.thumbnails import get_thumbnail_path
746746

747747
# full clear line for proper styling
748748

0 commit comments

Comments
 (0)