Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1439)

Unified Diff: git_cl_hooks.py

Issue 528004: Catch ValueErrors when trying to convert the CL issue number in git presubmit... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl_hooks.py
===================================================================
--- git_cl_hooks.py (revision 35790)
+++ git_cl_hooks.py (working copy)
@@ -42,10 +42,10 @@
name = m.group(1)
files = scm.GIT.CaptureStatus([root], upstream_branch)
issue = Backquote(['git', 'cl', 'status', '--field=id'])
- if issue == "None":
+ try:
+ description = gcl.GetIssueDescription(int(issue))
chase 2010/01/08 20:15:56 I suspect this code is a no-op on my system.. md5s
Robert Sesek 2010/01/08 20:23:46 I'm on a Mac, FYI: [src (gtk-cookie-test)] rsesek
+ except ValueError:
description = m.group(2)
- else:
- description = gcl.GetIssueDescription(int(issue))
patchset = None
self.change = presubmit_support.GitChange(name, description, absroot, files,
issue, patchset)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698