Chromium Code Reviews| Index: git_cl.py |
| =================================================================== |
| --- git_cl.py (revision 116333) |
| +++ git_cl.py (working copy) |
| @@ -513,7 +513,19 @@ |
| issue = ConvertToInteger(self.GetIssue()) |
| patchset = ConvertToInteger(self.GetPatchset()) |
| if issue: |
| - description = self.GetDescription() |
| + try: |
| + description = self.GetDescription() |
| + except urllib2.HTTPError, e: |
|
M-A Ruel
2012/01/04 17:56:51
I'd prefer to have this at line 448 so all calls w
|
| + if e.code == 404: |
| + DieWithError( |
| + ('\nWhile fetching the description for issue %d, received a 404\n' |
| + '(not found) error. It is likely that you deleted this issue\n' |
| + 'on the server. If this is the case, please run\n' |
| + ' git cl issue 0\n' |
| + 'to clear the association with the deleted issue, and then run\n' |
| + 'this command again.') % issue) |
| + else: |
| + DieWithError('\nFailed to fetch description. HTTP error ' + e.code) |
| else: |
| # If the change was never uploaded, use the log messages of all commits |
| # up to the branch point, as git cl upload will prefill the description |