You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
3.7 and 2.6 coexistance in handling jump targets
This commit is contained in:
@@ -104,6 +104,9 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if last == n:
|
||||
last -= 1
|
||||
jmp = test[1]
|
||||
if self.version > 2.6:
|
||||
jmp_target = jmp[0].attr
|
||||
else:
|
||||
jmp_target = int(jmp[0].pattr)
|
||||
|
||||
|
||||
@@ -112,6 +115,7 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
jf_cf_pop = ast[2]
|
||||
|
||||
if jf_cf_pop == "jf_cf_pop" and jf_cf_pop[0] == "JUMP_FORWARD":
|
||||
int(jf_cf_pop[0].pattr)
|
||||
if int(jf_cf_pop[0].pattr) < tokens[last-1].off2int():
|
||||
return True
|
||||
|
||||
|
Reference in New Issue
Block a user