Python 3.6+ control flow

This commit is contained in:
rocky
2018-12-15 09:17:54 -05:00
parent 49999b2633
commit a7ceedb62c
3 changed files with 8 additions and 4 deletions

View File

@@ -957,8 +957,6 @@ class Scanner3(Scanner):
elif op == self.opc.POP_EXCEPT:
next_offset = xdis.next_offset(op, self.opc, offset)
target = self.get_target(next_offset)
if target is None:
from trepan.api import debug; debug()
if target > next_offset:
next_op = code[next_offset]
if (self.opc.JUMP_ABSOLUTE == next_op and
@@ -986,8 +984,9 @@ class Scanner3(Scanner):
# In RETURN_VALUE, JUMP_ABSOLUTE, RETURN_VALUE is never RETURN_END_IF
if op == self.opc.RETURN_VALUE:
next_offset = xdis.next_offset(op, self.opc, offset)
if (next_offset < len(code) and code[next_offset] == self.opc.JUMP_ABSOLUTE and
offset in self.return_end_ifs):
if ( next_offset < len(code) and
(code[next_offset] == self.opc.JUMP_ABSOLUTE and
offset in self.return_end_ifs) ):
self.return_end_ifs.remove(offset)
pass
pass