Commit 6e2d1ad3 authored by Michal Čihař's avatar Michal Čihař

Do not use iterators for Python 2.6 compatibility

We should not have huge list anyway.

See issue #258
parent 067fe59b
......@@ -99,7 +99,7 @@ class XMLTagsCheck(TargetCheck):
# Check if source is XML
try:
source_tree = self.parse_xml(source)
source_tags = [x.tag for x in source_tree.iter()]
source_tags = [x.tag for x in source_tree]
self.set_cache(unit, source_tags, cache_slot)
except:
# Source is not valid XML, we give up
......@@ -109,7 +109,7 @@ class XMLTagsCheck(TargetCheck):
# Check target
try:
target_tree = self.parse_xml(target)
target_tags = [x.tag for x in target_tree.iter()]
target_tags = [x.tag for x in target_tree]
except:
# 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