From 1c96df0e2a02da1d07730125a5738d8277397854 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 27 Oct 2009 07:19:45 -0400 Subject: Didn't deal with internal returns properly. --- coverage/parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index 29144859..6f15b12f 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -376,20 +376,20 @@ class ByteParser(object): if bc.op in OPS_CODE_END: # The opcode can exit the code object. chunk.exits.add(-1) - elif bc.op in OPS_PUSH_BLOCK: + if bc.op in OPS_PUSH_BLOCK: # The opcode adds a block to the block_stack. block_stack.append((bc.op, bc.jump_to)) - elif bc.op in OPS_POP_BLOCK: + if bc.op in OPS_POP_BLOCK: # The opcode pops a block from the block stack. block_stack.pop() - elif bc.op in OPS_CHUNK_END: + if bc.op in OPS_CHUNK_END: # This opcode forces the end of the chunk. if bc.op == OP_BREAK_LOOP: # A break is implicit: jump where the top of the # block_stack points. chunk.exits.add(block_stack[-1][1]) chunk = None - elif bc.op == OP_END_FINALLY: + if bc.op == OP_END_FINALLY: if block_stack: # A break that goes through a finally will jump to whatever # block is on top of the stack. -- cgit v1.2.1