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

Unified Diff: apply_issue.py

Issue 1385653002: apply_issue: actually catch exception during patch download. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 2 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: apply_issue.py
diff --git a/apply_issue.py b/apply_issue.py
index dd77d8eb0c411b020fe5b578804dbc5080da1ccb..b4dbd7896d9175c1390b8bb583394bc4182a93d7 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') % (
« 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