Trying to get logic honor if-statements to control output

Ok, i’ve been fiddling around a bit as to the feedback/comment @thl-cmk has made.

So i changed the

if line[0].isdigit():  # this checks for a number

to

if (line[0][0].isdigit()): # this should (only) check the _first_character of the line is a number

From my point of view this should be the corect criteria to move further down the logic.
However if i were to make a line after this

yield Result(state=State.WARN, summary=line[0])
return

I only see the digit back … not the entire line - which i would expect.
It is as if the content of line[0] is replaced with the outcome of the evaluation.

  • Glowsome