From e56fe82c45d2cebdc97d40f8dbdbe75c70476976 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 28 May 2010 20:36:57 +0000 Subject: [PATCH] Fix argument checking in gcl.py Otherwise, commands like "gcl commit" would throw an exception instead of a comprehensible error message. TBR=jam Review URL: http://codereview.chromium.org/2366002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48520 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcl.py b/gcl.py index 66c3389f6..c8756e14b 100755 --- a/gcl.py +++ b/gcl.py @@ -667,6 +667,8 @@ def need_change(function): def need_change_and_args(function): """Converts args -> change_info.""" def hook(args): + if not args: + ErrorExit("You need to pass a change list name") change_info = ChangeInfo.Load(args.pop(0), GetRepositoryRoot(), True, True) return function(change_info, args) defer_attributes(function, hook)