Commit 590279b4 authored by Michal Čihař's avatar Michal Čihař

Catch only syntax errors here

parent 4f057513
......@@ -101,7 +101,7 @@ class XMLTagsCheck(TargetCheck):
source_tree = self.parse_xml(source)
source_tags = [x.tag for x in source_tree]
self.set_cache(unit, source_tags, cache_slot)
except:
except SyntaxError:
# Source is not valid XML, we give up
self.set_cache(unit, [], cache_slot)
return False
......@@ -110,7 +110,7 @@ class XMLTagsCheck(TargetCheck):
try:
target_tree = self.parse_xml(target)
target_tags = [x.tag for x in target_tree]
except:
except SyntaxError:
# Target is not valid XML
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment