diff --git a/git_cl_hooks.py b/git_cl_hooks.py index d2f876027..f884e6895 100644 --- a/git_cl_hooks.py +++ b/git_cl_hooks.py @@ -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)