Commit 0dfc4ef2 authored by rsesek@chromium.org's avatar rsesek@chromium.org

Catch ValueErrors when trying to convert the CL issue number in git presubmit hooks

BUG=31695
TEST=none
Review URL: http://codereview.chromium.org/528004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35816 0039d316-1c4b-4281-b951-d872f2087c98
parent 54d1f1ae
......@@ -42,10 +42,10 @@ class ChangeOptions:
name = m.group(1)
files = scm.GIT.CaptureStatus([root], upstream_branch)
issue = Backquote(['git', 'cl', 'status', '--field=id'])
if issue == "None":
description = m.group(2)
else:
try:
description = gcl.GetIssueDescription(int(issue))
except ValueError:
description = m.group(2)
patchset = None
self.change = presubmit_support.GitChange(name, description, absroot, files,
issue, patchset)
......
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