Skip to content

Commit 12d43f1

Browse files
committed
need to add an exception for empty source title
1 parent 7fecc31 commit 12d43f1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lxml/lxmlGramplet.py

Lines changed: 9 additions & 6 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')
@@ -426,6 +426,9 @@ def ParseXML(self, tree, filename):
426426
if text not in places:
427427
places.append(text) # temp display
428428
if three.tag == NAMESPACE + 'stitle' and three.text not in sources:
429+
# need to add an exception
430+
if not three.text:
431+
three.text = ""
429432
sources.append(three.text)
430433
if three.tag == NAMESPACE + 'file' and three.items() not in thumbs:
431434
thumbs.append(three.items())

0 commit comments

Comments
 (0)