diff options
author | Brett Cannon <brett@python.org> | 2014-02-28 15:44:45 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-02-28 15:44:45 (GMT) |
commit | 298bb967767d666fca8177f8c2352c2134490565 (patch) | |
tree | a8e92ef700a9abdfb843d8d7cde40c6382245ac6 /Lib/modulefinder.py | |
parent | 815b41b1cdb98686fc3f9cdf995b6983c12c04b3 (diff) | |
download | cpython-298bb967767d666fca8177f8c2352c2134490565.zip cpython-298bb967767d666fca8177f8c2352c2134490565.tar.gz cpython-298bb967767d666fca8177f8c2352c2134490565.tar.bz2 |
Issue #20778: Fix modulefinder to work with bytecode-only modules.
Bug filed and initial attempt at a patch by Bohuslav Kabrda.
Diffstat (limited to 'Lib/modulefinder.py')
-rw-r--r-- | Lib/modulefinder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index 82c7aed..264b0f0 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -287,7 +287,7 @@ class ModuleFinder: if fp.read(4) != imp.get_magic(): self.msgout(2, "raise ImportError: Bad magic number", pathname) raise ImportError("Bad magic number in %s" % pathname) - fp.read(4) + fp.read(8) # Skip mtime and size. co = marshal.load(fp) else: co = None |