summaryrefslogtreecommitdiffstats
path: root/tools/checkdeps
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 16:33:09 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 16:33:09 +0000
commita4cfbcb362f830dc4a7181cb97a439749a6bb2d0 (patch)
tree4e9ec7b68b0b92f6e77c614e098b70db31ca5038 /tools/checkdeps
parente1ce5aef186ab99aa97c7d6cc78dd587fabf13ab (diff)
downloadchromium_src-a4cfbcb362f830dc4a7181cb97a439749a6bb2d0.zip
chromium_src-a4cfbcb362f830dc4a7181cb97a439749a6bb2d0.tar.gz
chromium_src-a4cfbcb362f830dc4a7181cb97a439749a6bb2d0.tar.bz2
Fix up checkdeps
- use the options to get the root, don't assume the layout of sys.argv. - if no root was set, use __file__ instead of assuming sys.argv[0] will be a full path. BUG=none TEST=none Review URL: http://codereview.chromium.org/6871014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/checkdeps')
-rwxr-xr-xtools/checkdeps/checkdeps.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/checkdeps/checkdeps.py b/tools/checkdeps/checkdeps.py
index 6ee22b1..e7c49a2 100755
--- a/tools/checkdeps/checkdeps.py
+++ b/tools/checkdeps/checkdeps.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# 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.
@@ -444,9 +444,9 @@ def main(options, args):
global BASE_DIRECTORY
if not options.base_directory:
BASE_DIRECTORY = os.path.abspath(
- os.path.join(os.path.abspath(sys.argv[0]), "../../.."))
+ os.path.join(os.path.abspath(os.path.dirname(__file__)), "../.."))
else:
- BASE_DIRECTORY = os.path.abspath(sys.argv[2])
+ BASE_DIRECTORY = os.path.abspath(options.base_directory)
# Figure out which directory we have to check.
if len(args) == 0: