Accept x0ret's suggestion for 3.6+ if detection..

in the presense of a try block.

Fixes #229
This commit is contained in:
rocky
2019-05-10 19:36:16 -04:00
parent 4db364f701
commit 86dd321256

View File

@@ -916,7 +916,7 @@ class Scanner3(Scanner):
# Python 3.5 may remove as dead code a JUMP
# instruction after a RETURN_VALUE. So we check
# based on seeing SETUP_EXCEPT various places.
if self.version < 3.8 and code[rtarget] == self.opc.SETUP_EXCEPT:
if self.version < 3.6 and code[rtarget] == self.opc.SETUP_EXCEPT:
return
# Check that next instruction after pops and jump is
# not from SETUP_EXCEPT