summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorpetersont@chromium.org <petersont@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 18:50:02 +0000
committerpetersont@chromium.org <petersont@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 18:50:02 +0000
commitb12b4d00b2de9e57736bca56db0f2f046e3ca22b (patch)
tree866441b64645fa7af2b683b344b566b5d08f541c /tools
parente3ad1a8f1363f3f15bb2a3b41fd6b430933fc3dd (diff)
downloadchromium_src-b12b4d00b2de9e57736bca56db0f2f046e3ca22b.zip
chromium_src-b12b4d00b2de9e57736bca56db0f2f046e3ca22b.tar.gz
chromium_src-b12b4d00b2de9e57736bca56db0f2f046e3ca22b.tar.bz2
Before if you provided a non-existent tool, grit would give an error message referring you to the help, but if you don't provide a tool at all it would just fail.
Review URL: http://codereview.chromium.org/3549016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/grit/grit/grit_runner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/grit/grit/grit_runner.py b/tools/grit/grit/grit_runner.py
index c0edef9..2af7299 100644
--- a/tools/grit/grit/grit_runner.py
+++ b/tools/grit/grit/grit_runner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.4
+#!/usr/bin/python2.4
# Copyright (c) 2006-2008 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.
@@ -172,6 +172,9 @@ def Main(args):
else:
options = Options()
args = options.ReadOptions(args) # args may be shorter after this
+ if not args:
+ print "No tool provided. Try running 'grit help' for a list of tools."
+ return 2
tool = args[0]
if not _GetToolInfo(tool):
print "No such tool. Try running 'grit help' for a list of tools."