summaryrefslogtreecommitdiff
path: root/Lib/modulefinder.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-02-28 10:44:45 -0500
committerBrett Cannon <brett@python.org>2014-02-28 10:44:45 -0500
commit298bb967767d666fca8177f8c2352c2134490565 (patch)
treea8e92ef700a9abdfb843d8d7cde40c6382245ac6 /Lib/modulefinder.py
parent815b41b1cdb98686fc3f9cdf995b6983c12c04b3 (diff)
downloadcpython-git-298bb967767d666fca8177f8c2352c2134490565.tar.gz
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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 82c7aed1d7..264b0f0bfd 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