Commit e56fe82c authored by maruel@chromium.org's avatar maruel@chromium.org

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
parent 9e1da9e0
......@@ -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)
......
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