Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: tools/find_depot_tools.py

Issue 7677019: Fix infinite recursion in find_depot_tools (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/find_depot_tools.py
diff --git a/tools/find_depot_tools.py b/tools/find_depot_tools.py
index 4647738d55977efdb4ca15d30d908c07be20c3c2..0fa151b162c8da3f599ff461024f9cc3e46212a2 100644
--- a/tools/find_depot_tools.py
+++ b/tools/find_depot_tools.py
@@ -23,11 +23,13 @@ def add_depot_tools_to_path():
return i
# Rare case, it's not even in PATH, look upward up to root.
root_dir = os.path.dirname(os.path.abspath(__file__))
- while root_dir:
+ previous_dir = os.path.abspath(__file__)
+ while root_dir and root_dir != previous_dir:
if os.path.isfile(os.path.join(root_dir, 'depot_tools', 'breakpad.py')):
i = os.path.join(root_dir, 'depot_tools')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698