diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-04 12:48:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-04 12:48:17 +0300 |
commit | 8bbc991b6c72890da333a2418cb41b405cd3996d (patch) | |
tree | 566be65c0a5eae1cecf2d1a623ee8080bf5cf7ea /testxml | |
parent | f8152d4ff42a3f14d635eacb92ed3aa1fe236295 (diff) | |
download | evol-tools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.gz evol-tools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.bz2 evol-tools-8bbc991b6c72890da333a2418cb41b405cd3996d.tar.xz evol-tools-8bbc991b6c72890da333a2418cb41b405cd3996d.zip |
testxml: fix crash if particle xml file is incorrect xml file.
Diffstat (limited to 'testxml')
-rwxr-xr-x | testxml/testxml.py | 6 |
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: |