Commit 258d17f2 authored by maruel@chromium.org's avatar maruel@chromium.org

Fix SCM.ReadRootFile when self.gclient_root is not yet defined

Review URL: http://codereview.chromium.org/2102004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47426 0039d316-1c4b-4281-b951-d872f2087c98
parent 7c1a02b5
......@@ -158,8 +158,11 @@ class SCM(object):
logging.info('Found %s at %s' % (filename, self.checkout_root))
return gclient_util.FileRead(filepath)
return None
root = os.path.abspath(self.gclient_root)
cur = os.path.abspath(self.checkout_root)
if self.gclient_root:
root = os.path.abspath(self.gclient_root)
else:
root = gclient_utils.FindGclientRoot(cur)
assert cur.startswith(root), (root, cur)
while cur.startswith(root):
filepath = os.path.join(cur, filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment