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

Side by Side Diff: rietveld.py

Issue 180723002: Incorrect SSLError attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/rietveld_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Defines class Rietveld to easily access a rietveld instance. 5 """Defines class Rietveld to easily access a rietveld instance.
6 6
7 Security implications: 7 Security implications:
8 8
9 The following hypothesis are made: 9 The following hypothesis are made:
10 - Rietveld enforces: 10 - Rietveld enforces:
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 except urllib2.URLError, e: 402 except urllib2.URLError, e:
403 if retry >= (maxtries - 1): 403 if retry >= (maxtries - 1):
404 raise 404 raise
405 if (not 'Name or service not known' in e.reason and 405 if (not 'Name or service not known' in e.reason and
406 not 'EOF occurred in violation of protocol' in e.reason): 406 not 'EOF occurred in violation of protocol' in e.reason):
407 # Usually internal GAE flakiness. 407 # Usually internal GAE flakiness.
408 raise 408 raise
409 except ssl.SSLError, e: 409 except ssl.SSLError, e:
410 if retry >= (maxtries - 1): 410 if retry >= (maxtries - 1):
411 raise 411 raise
412 if not 'timed out' in e.reason: 412 if not 'timed out' in str(e):
413 raise 413 raise
414 # If reaching this line, loop again. Uses a small backoff. 414 # If reaching this line, loop again. Uses a small backoff.
415 time.sleep(1+maxtries*2) 415 time.sleep(1+maxtries*2)
416 finally: 416 finally:
417 upload.ErrorExit = old_error_exit 417 upload.ErrorExit = old_error_exit
418 418
419 # DEPRECATED. 419 # DEPRECATED.
420 Send = get 420 Send = get
421 421
422 422
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 535
536 def set_flag(self, issue, patchset, flag, value): # pylint:disable=R0201 536 def set_flag(self, issue, patchset, flag, value): # pylint:disable=R0201
537 logging.info('ReadOnlyRietveld: setting flag "%s" to "%s" for issue %d' % 537 logging.info('ReadOnlyRietveld: setting flag "%s" to "%s" for issue %d' %
538 (flag, value, issue)) 538 (flag, value, issue))
539 ReadOnlyRietveld._local_changes.setdefault(issue, {})[flag] = value 539 ReadOnlyRietveld._local_changes.setdefault(issue, {})[flag] = value
540 540
541 def trigger_try_jobs( # pylint:disable=R0201 541 def trigger_try_jobs( # pylint:disable=R0201
542 self, issue, patchset, reason, clobber, revision, builders_and_tests): 542 self, issue, patchset, reason, clobber, revision, builders_and_tests):
543 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 543 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
544 (builders_and_tests, issue)) 544 (builders_and_tests, issue))
OLDNEW
« no previous file with comments | « no previous file | tests/rietveld_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698