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

gcl delete <non-existent change> won't throw an exception anymore

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80337 0039d316-1c4b-4281-b951-d872f2087c98
parent 58ef297b
......@@ -1304,7 +1304,10 @@ def CMDdelete(args):
"""Deletes a changelist."""
if not len(args) == 1:
ErrorExit('You need to pass a change list name')
os.remove(GetChangelistInfoFile(args[0]))
filepath = GetChangelistInfoFile(args[0])
if not os.path.isfile(filepath):
ErrorExit('You need to pass a valid change list name')
os.remove(filepath)
return 0
......
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