Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index a2bc0ffbe5a867f7f83d5e0ee9412a5d69bf9509..3b7ab2934eb3fa21c31672a82b6ea99b0366a2a0 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -698,7 +698,7 @@ or verify this branch is set up to track another (via the --track argument to |
issue = self.GetIssue() |
try: |
self.description = self.RpcServer().get_description(issue).strip() |
- except urllib2.HTTPError, e: |
+ except urllib2.HTTPError as e: |
if e.code == 404: |
DieWithError( |
('\nWhile fetching the description for issue %d, received a ' |
@@ -712,6 +712,12 @@ or verify this branch is set up to track another (via the --track argument to |
else: |
DieWithError( |
'\nFailed to fetch issue description. HTTP error %d' % e.code) |
+ except urllib2.URLError as e: |
+ print >> sys.stderr, ( |
+ 'Warning: Failed to retrieve CL description due to network ' |
+ 'failure.') |
+ self.description = '' |
+ |
self.has_description = True |
if pretty: |
wrapper = textwrap.TextWrapper() |
@@ -1316,8 +1322,9 @@ def CMDstatus(parser, args): |
return 0 |
print cl.GetBranch() |
print 'Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL()) |
- print 'Issue description:' |
- print cl.GetDescription(pretty=True) |
+ if not options.fast: |
+ print 'Issue description:' |
iannucci
2014/07/27 18:05:09
it would be neat to cache this non-fast stuff. It
M-A Ruel
2014/07/28 15:35:41
The funny thing is that gcl does that. It should b
|
+ print cl.GetDescription(pretty=True) |
return 0 |