5b2327e051d5243f80b9b9f39f6800bbc8749bed,PyInstaller/utils/misc.py,,compile_py_files,#,101
Before Change
obj_fnm = os.path.join(leading, mod_name + ext)
// TODO see above regarding read()[:4] versus read(4)
needs_compile = (mtime(src_fnm) > mtime(obj_fnm)
or
open (obj_fnm, "rb").read()[:4] != BYTECODE_MAGIC)
if needs_compile:
// TODO see above todo regarding using node.code
py_compile.compile(src_fnm, obj_fnm)
After Change
obj_fnm = os.path.join(leading, mod_name + ext)
// TODO see above regarding read()[:4] versus read(4)
needs_compile = mtime(src_fnm) > mtime(obj_fnm)
if not needs_compile:
with open(obj_fnm, "rb") as fh:
needs_compile = fh.read()[:4] != BYTECODE_MAGIC
if needs_compile:
// TODO see above todo regarding using node.code
py_compile.compile(src_fnm, obj_fnm)
logger.debug("compiled %s", src_fnm)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: pyinstaller/pyinstaller
Commit Name: 5b2327e051d5243f80b9b9f39f6800bbc8749bed
Time: 2018-09-09
Author: contact@tiger-222.fr
File Name: PyInstaller/utils/misc.py
Class Name:
Method Name: compile_py_files
Project Name: pyinstaller/pyinstaller
Commit Name: 5b2327e051d5243f80b9b9f39f6800bbc8749bed
Time: 2018-09-09
Author: contact@tiger-222.fr
File Name: tests/old_suite/runtests.py
Class Name: BuildTestRunner
Method Name: test_logs