You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
correct work if list in def uncompyle_file
This commit is contained in:
@@ -84,6 +84,7 @@ def uncompyle(version, co, out=None, showasm=0, showast=0):
|
|||||||
'''
|
'''
|
||||||
diassembles a given code block 'co'
|
diassembles a given code block 'co'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
assert type(co) == types.CodeType
|
assert type(co) == types.CodeType
|
||||||
|
|
||||||
# store final output stream for case of error
|
# store final output stream for case of error
|
||||||
@@ -138,7 +139,11 @@ def uncompyle_file(filename, outstream=None, showasm=0, showast=0):
|
|||||||
decompile Python byte-code file (.pyc)
|
decompile Python byte-code file (.pyc)
|
||||||
"""
|
"""
|
||||||
version, co = _load_module(filename)
|
version, co = _load_module(filename)
|
||||||
uncompyle(version, co, outstream, showasm, showast)
|
if type(co) == list:
|
||||||
|
for con in co:
|
||||||
|
uncompyle(version, con, outstream, showasm, showast)
|
||||||
|
else:
|
||||||
|
uncompyle(version, co, outstream, showasm, showast)
|
||||||
co = None
|
co = None
|
||||||
|
|
||||||
# ---- main ----
|
# ---- main ----
|
||||||
|
Reference in New Issue
Block a user