From 8bbc991b6c72890da333a2418cb41b405cd3996d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 4 Jun 2012 12:48:17 +0300 Subject: testxml: fix crash if particle xml file is incorrect xml file. --- testxml/testxml.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'testxml/testxml.py') 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: -- cgit v1.2.3-70-g09d2