diff options
author | Guido van Rossum <guido@python.org> | 2000-09-15 16:37:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-09-15 16:37:42 (GMT) |
commit | 8999053326a8e7a3e6e8d2ca70810fec19804096 (patch) | |
tree | e1cc0fc6c3fd415ac17a6b5ef5c3b2107ef69a0a /Tools/freeze | |
parent | 3634112b40bac1086cff2019592beb27e28971c4 (diff) | |
download | cpython-8999053326a8e7a3e6e8d2ca70810fec19804096.zip cpython-8999053326a8e7a3e6e8d2ca70810fec19804096.tar.gz cpython-8999053326a8e7a3e6e8d2ca70810fec19804096.tar.bz2 |
Fix for bug #113693: with the changes to the IMPORT_FROM opcodes, this
crashed on an assert.
Diffstat (limited to 'Tools/freeze')
-rw-r--r-- | Tools/freeze/modulefinder.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/freeze/modulefinder.py b/Tools/freeze/modulefinder.py index a75e2f3..e84a541 100644 --- a/Tools/freeze/modulefinder.py +++ b/Tools/freeze/modulefinder.py @@ -21,6 +21,10 @@ if sys.platform=="win32": IMPORT_NAME = dis.opname.index('IMPORT_NAME') IMPORT_FROM = dis.opname.index('IMPORT_FROM') +STORE_NAME = dis.opname.index('STORE_NAME') +STORE_FAST = dis.opname.index('STORE_FAST') +STORE_GLOBAL = dis.opname.index('STORE_GLOBAL') +STORE_OPS = [STORE_NAME, STORE_FAST, STORE_GLOBAL] # Modulefinder does a good job at simulating Python's, but it can not # handle __path__ modifications packages make at runtime. Therefore there @@ -296,6 +300,9 @@ class ModuleFinder: if not self.badmodules.has_key(fullname): self.badmodules[fullname] = {} self.badmodules[fullname][m.__name__] = None + elif op in STORE_OPS: + # Skip; each IMPORT_FROM is followed by a STORE_* opcode + pass else: lastname = None for c in co.co_consts: |