eriwen / lcov-to-cobertura-xml

Converts lcov output to Cobertura-compatible XML for CI
https://eriwen.github.io/lcov-to-cobertura-xml/
Apache License 2.0
187 stars 73 forks source link

KeyError: 'hits' #6

Closed fly2never closed 12 years ago

fly2never commented 12 years ago

I've got this exception KeyError: 'hits'

In my coverage_data, some class_data['lines'][line_number] just like this:

{'branch-conditions-covered': 0, 'branch-conditions-total': 2, 'branch': 'true'} This line could not be parsed correctly. But this one is ok: {'hits': '0', 'branch-conditions-covered': 0, 'branch-conditions-total': 0, 'branch': 'false'}