disas.py: track load_module API change

opcode_23.py: make it more like opcode_27.py
This commit is contained in:
rocky
2015-12-18 23:03:47 -05:00
parent 0a49c7a15b
commit f70641da5d
2 changed files with 2 additions and 6 deletions

View File

@@ -78,7 +78,7 @@ def disassemble_file(filename, outstream=None):
try to find the corresponding compiled object.
"""
filename = check_object_path(filename)
version, co = uncompyle6.load_module(filename)
version, magic_int, co = uncompyle6.load_module(filename)
if type(co) == list:
for con in co:
disco(version, con, outstream)

View File

@@ -3,10 +3,6 @@ opcode module - potentially shared between dis and other modules which
operate on bytecodes (e.g. peephole optimizers).
"""
__all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs",
"haslocal", "hascompare", "hasfree", "opname", "opmap",
"HAVE_ARGUMENT", "EXTENDED_ARG"]
cmp_op = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is',
'is not', 'exception match', 'BAD')
@@ -20,7 +16,7 @@ hasfree = []
opmap = {}
opname = [''] * 256
for op in range(256): opname[op] = '<' + repr(op) + '>'
for op in range(256): opname[op] = '<%r>' % (op,)
del op
def def_op(name, op):