Remove support for importing Python 2 pefile
img_fingerprint.py and pdb_fingerprint_from_img.py both supported being run under Python 2 or Python 3 as part of the Python 3 migration. There should be no remaining Python 2 usages of these scripts so this change removes the Python 2 support in preparation for removing the Python 2 version of pefile. Bug: 1213186 Change-Id: I91d9dd2b331fab62eb6fb32fd18d04c79c21a0db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4481611 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Cr-Commit-Position: refs/heads/main@{#1136847}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
447cb2088e
commit
3af1836fd7
tools/symsrc
@ -10,17 +10,13 @@ compressed .dl_) or .exe is expected at a path like:
|
||||
foo.dll/FINGERPRINT/foo.dll
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Assume this script is under tools/symsrc/
|
||||
_SCRIPT_DIR = os.path.dirname(__file__)
|
||||
_ROOT_DIR = os.path.join(_SCRIPT_DIR, os.pardir, os.pardir)
|
||||
_PEFILE_DIR = os.path.join(
|
||||
_ROOT_DIR, 'third_party', 'pefile_py3' if sys.version_info >=
|
||||
(3, 0) else 'pefile')
|
||||
_PEFILE_DIR = os.path.join(_ROOT_DIR, 'third_party', 'pefile_py3')
|
||||
|
||||
sys.path.insert(1, _PEFILE_DIR)
|
||||
|
||||
|
@ -12,17 +12,13 @@ We can retrieve the same information from the .PDB file itself, but this file
|
||||
format is much more difficult and undocumented. Instead, we can look at the
|
||||
DLL's reference to the PDB, and use that to retrieve the information."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Assume this script is under tools/symsrc/
|
||||
_SCRIPT_DIR = os.path.dirname(__file__)
|
||||
_ROOT_DIR = os.path.join(_SCRIPT_DIR, os.pardir, os.pardir)
|
||||
_PEFILE_DIR = os.path.join(
|
||||
_ROOT_DIR, 'third_party', 'pefile_py3' if sys.version_info >=
|
||||
(3, 0) else 'pefile')
|
||||
_PEFILE_DIR = os.path.join(_ROOT_DIR, 'third_party', 'pefile_py3')
|
||||
|
||||
sys.path.insert(1, _PEFILE_DIR)
|
||||
|
||||
|
Reference in New Issue
Block a user