Index: Lib/modulefinder.py =================================================================== --- Lib/modulefinder.py (revision 58574) +++ Lib/modulefinder.py (working copy) @@ -16,12 +16,13 @@ # remain compatible with Python < 2.3 READ_MODE = "r" -LOAD_CONST = chr(dis.opname.index('LOAD_CONST')) -IMPORT_NAME = chr(dis.opname.index('IMPORT_NAME')) -STORE_NAME = chr(dis.opname.index('STORE_NAME')) -STORE_GLOBAL = chr(dis.opname.index('STORE_GLOBAL')) +# XXX Clean up once str8's cstor matches bytes. +LOAD_CONST = str8(chr(dis.opname.index('LOAD_CONST'))) +IMPORT_NAME = str8(chr(dis.opname.index('IMPORT_NAME'))) +STORE_NAME = str8(chr(dis.opname.index('STORE_NAME'))) +STORE_GLOBAL = str8(chr(dis.opname.index('STORE_GLOBAL'))) STORE_OPS = [STORE_NAME, STORE_GLOBAL] -HAVE_ARGUMENT = chr(dis.HAVE_ARGUMENT) +HAVE_ARGUMENT = str8(chr(dis.HAVE_ARGUMENT)) # Modulefinder does a good job at simulating Python's, but it can not # handle __path__ modifications packages make at runtime. Therefore there @@ -367,7 +368,7 @@ consts = co.co_consts LOAD_LOAD_AND_IMPORT = LOAD_CONST + LOAD_CONST + IMPORT_NAME while code: - c = chr(code[0]) + c = str8(chr(code[0])) if c in STORE_OPS: oparg, = unpack('