Bugfix format patch.

develop
Самоукин Алексей 14 years ago
parent 79dc531b3a
commit 0120fe0a65

@ -76,6 +76,12 @@ class patch(_error):
if node.tagName == "reg":
if node.firstChild:
reText = node.firstChild.nodeValue
if reText is None:
textNode = node.toxml().encode("UTF8")
self.setError(\
_("Incorrect text template")+ ": \n" +\
"%s" %textNode)
return False
else:
self.setError(\
_("Incorrect text template '<reg></reg>'"))
@ -91,11 +97,16 @@ class patch(_error):
self.setError(\
_("Incorrect text template '<reg>%s</reg>'")\
%reText)
return False
elif node.tagName == "text" and regex:
if node.firstChild:
text = node.firstChild.nodeValue
if text is None:
textNode = node.toxml().encode("UTF8")
self.setError(\
_("Incorrect text template")+ ": \n" +\
"%s" %textNode)
return False
else:
text = ""
dataList.append((regex, text))

Loading…
Cancel
Save