summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-04 12:48:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-04 12:48:17 +0300
commit8bbc991b6c72890da333a2418cb41b405cd3996d (patch)
tree566be65c0a5eae1cecf2d1a623ee8080bf5cf7ea
parentf8152d4ff42a3f14d635eacb92ed3aa1fe236295 (diff)
downloadtools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.gz
tools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.bz2
tools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.xz
tools-8bbc991b6c72890da333a2418cb41b405cd3996d.zip
testxml: fix crash if particle xml file is incorrect xml file.
-rwxr-xr-xtestxml/testxml.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index f49d347..d578484 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -835,7 +835,11 @@ def testParticle(id, file, src):
if not os.path.isfile(fullPath) or os.path.exists(fullPath) == False:
showMsgFile(file, "particle file not found", True)
return
- dom = minidom.parse(fullPath)
+ try:
+ dom = minidom.parse(fullPath)
+ except:
+ showMsgFile(file, "incorrect particle xml file", True)
+ return
nodes = dom.getElementsByTagName("particle")
if len(nodes) < 1: