You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
< 2.7 bug in not distinguishing raise from assert
This commit is contained in:
9
test/simple_source/stmts/04_raise.py
Normal file
9
test/simple_source/stmts/04_raise.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# 2.6.9 asynccore.py
|
||||
# Bug in 2.6 was confusing AssertError with an assert statement
|
||||
# There is special detect code to sort this out based on whether
|
||||
# we have POP_JUMP_IF_TRUE (2.7) / JUMP_IF_TRUE, POP_TOP
|
||||
|
||||
def compact_traceback(tb):
|
||||
if not tb: # Must have a traceback
|
||||
raise AssertionError("traceback does not exist")
|
||||
return
|
Reference in New Issue
Block a user