mirror of https://github.com/python/cpython.git
parent
26af93cf35
commit
ce33eb3ee8
|
@ -249,7 +249,7 @@ def load_module(self, fqname, fp, pathname, (suffix, mode, type)):
|
||||||
elif type == imp.PY_COMPILED:
|
elif type == imp.PY_COMPILED:
|
||||||
if fp.read(4) != imp.get_magic():
|
if fp.read(4) != imp.get_magic():
|
||||||
self.msgout(2, "raise ImportError: Bad magic number", pathname)
|
self.msgout(2, "raise ImportError: Bad magic number", pathname)
|
||||||
raise ImportError, "Bad magic number in %s", pathname
|
raise ImportError, "Bad magic number in %s" % pathname
|
||||||
fp.read(4)
|
fp.read(4)
|
||||||
co = marshal.load(fp)
|
co = marshal.load(fp)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue