From ca184158bd3d4f3c03e40607d165f63a969daa6f Mon Sep 17 00:00:00 2001 From: "tandrii@chromium.org" Date: Fri, 2 Oct 2015 15:02:42 +0000 Subject: [PATCH] apply_issue: actually catch exception during patch download. R=sergiyb@chromium.org,phajdan.jr@chromium.org BUG=537417 Review URL: https://codereview.chromium.org/1385653002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296986 0039d316-1c4b-4281-b951-d872f2087c98 --- apply_issue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apply_issue.py b/apply_issue.py index dd77d8eb0c..b4dbd7896d 100755 --- a/apply_issue.py +++ b/apply_issue.py @@ -203,7 +203,9 @@ def main(): print('Downloading patch from %s' % issue_url) try: patchset = obj.get_patch(issue_to_apply, patchset_to_apply) - except urllib2.HTTPError as e: + except urllib2.URLError: + logging.exception('failed to fetch the patch for issue %d, patchset %d.', + issue_to_apply, patchset_to_apply) print( 'Failed to fetch the patch for issue %d, patchset %d.\n' 'Try visiting %s/%d') % (