So I got two very similar python file A and B, with tiny difference: place of the dead loop statement. The first raise exception while the second works as expected.