Fix a dead loop in tools_webrtc/libs/generate_licenses.py
Bug: webrtc:13975 Signed-off-by: hanpfei <hanpfei@gmail.com> Change-Id: I3943f66b1a80e3f1e4b05f4436dbeff23f3d6285 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259280 Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Christoffer Jansson <jansson@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@google.com> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#36596}
This commit is contained in:
parent
4587852740
commit
edbaf57bd4
1
AUTHORS
1
AUTHORS
@ -120,6 +120,7 @@ Yaowen Guo <albertguo88@gmail.com>
|
||||
Yura Yaroshevich <yura.yaroshevich@gmail.com>
|
||||
Yuriy Pavlyshak <yuriy@appear.in>
|
||||
Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
Pengfei Han <hanpfei@gmail.com>
|
||||
# END individuals section.
|
||||
|
||||
# BEGIN organizations section.
|
||||
|
||||
@ -100,17 +100,9 @@ LIB_REGEX_TO_LICENSES_DICT = {
|
||||
}
|
||||
|
||||
|
||||
def FindSrcDirPath():
|
||||
"""Returns the abs path to the src/ dir of the project."""
|
||||
src_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
while os.path.basename(src_dir) != 'src':
|
||||
src_dir = os.path.normpath(os.path.join(src_dir, os.pardir))
|
||||
return src_dir
|
||||
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
WEBRTC_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir))
|
||||
SRC_DIR = FindSrcDirPath()
|
||||
SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
|
||||
sys.path.append(os.path.join(SRC_DIR, 'build'))
|
||||
import find_depot_tools
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user