Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Unified Diff: Lib/modulefinder.py

Issue 20778: ModuleFinder.load_module skips incorrect number of bytes in pyc files
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/test/test_modulefinder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/modulefinder.py Tue Feb 25 16:46:41 2014 -0800
+++ b/Lib/modulefinder.py Wed Feb 26 10:41:32 2014 +0100
@@ -290,7 +290,7 @@
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 date and file size
co = marshal.load(fp)
else:
co = None
« no previous file with comments | « no previous file | Lib/test/test_modulefinder.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+