Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
aa2c93f8
Unverified
Commit
aa2c93f8
authored
Aug 06, 2019
by
Dan Field
Committed by
GitHub
Aug 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused script (#37714)
parent
4c8fc781
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
45 deletions
+0
-45
find_depot_tools.py
dev/bots/find_depot_tools.py
+0
-45
No files found.
dev/bots/find_depot_tools.py
deleted
100644 → 0
View file @
4c8fc781
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Small utility function to find depot_tools and add it to the python path.
Will throw an ImportError exception if depot_tools can't be found since it
imports breakpad.
"""
import
os
import
sys
def
IsRealDepotTools
(
path
):
return
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
'gclient.py'
))
def
add_depot_tools_to_path
():
"""Search for depot_tools and add it to sys.path."""
# First look if depot_tools is already in PYTHONPATH.
for
i
in
sys
.
path
:
if
i
.
rstrip
(
os
.
sep
)
.
endswith
(
'depot_tools'
)
and
IsRealDepotTools
(
i
):
return
i
# Then look if depot_tools is in PATH, common case.
for
i
in
os
.
environ
[
'PATH'
]
.
split
(
os
.
pathsep
):
if
IsRealDepotTools
(
i
):
sys
.
path
.
append
(
i
.
rstrip
(
os
.
sep
))
return
i
# Rare case, it's not even in PATH, look upward up to root.
root_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
previous_dir
=
os
.
path
.
abspath
(
__file__
)
while
root_dir
and
root_dir
!=
previous_dir
:
i
=
os
.
path
.
join
(
root_dir
,
'depot_tools'
)
if
IsRealDepotTools
(
i
):
sys
.
path
.
append
(
i
)
return
i
previous_dir
=
root_dir
root_dir
=
os
.
path
.
dirname
(
root_dir
)
print
>>
sys
.
stderr
,
'Failed to find depot_tools'
return
None
add_depot_tools_to_path
()
# pylint: disable=W0611
import
breakpad
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment