Chromium Code Reviews| Index: build/find_depot_tools.py |
| diff --git a/tools/find_depot_tools.py b/build/find_depot_tools.py |
| old mode 100644 |
| new mode 100755 |
| similarity index 82% |
| rename from tools/find_depot_tools.py |
| rename to build/find_depot_tools.py |
| index 1f91866279d2666f3e9832d85ddd609a0d4f503e..3ead61598da0546d823c674d7acd9030a34002e0 |
| --- a/tools/find_depot_tools.py |
| +++ b/build/find_depot_tools.py |
| @@ -1,3 +1,4 @@ |
| +#!/usr/bin/env python |
| # 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. |
| @@ -5,6 +6,9 @@ |
| Will throw an ImportError exception if depot_tools can't be found since it |
| imports breakpad. |
| + |
| +This can also be used as a standlone script to print out the depot_tools |
|
Dirk Pranke
2015/10/23 22:07:53
nit: "standalone"
Roland McGrath
2015/10/23 22:55:45
Done.
|
| +directory location. |
| """ |
| import os |
| @@ -39,7 +43,18 @@ def add_depot_tools_to_path(): |
| print >> sys.stderr, 'Failed to find depot_tools' |
| return None |
| -add_depot_tools_to_path() |
| +DEPOT_TOOLS_PATH = add_depot_tools_to_path() |
| # pylint: disable=W0611 |
| import breakpad |
| + |
| + |
| +def main(): |
| + if DEPOT_TOOLS_PATH is None: |
| + return 1 |
| + print DEPOT_TOOLS_PATH |
| + return 0 |
| + |
| + |
| +if __name__ == '__main__': |
| + sys.exit(main()) |