Commit 658ebcfa authored by legoktm's avatar legoktm

Don't rely on boolean of a tag element

It'll be False if it's empty, which <metrics> is!!!
parent d815a0ed
......@@ -35,12 +35,12 @@ def process_file(fname):
root = tree.getroot()
project = root.getchildren()[0]
assert project.tag == 'project'
metrics = False
metrics = None
for child in project.getchildren():
if child.tag == 'metrics':
metrics = child
if not metrics:
if metrics is None:
raise ValueError('Unable to find <metrics> in %s!' % fname)
stuff = [
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment