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

Side by Side Diff: rietveld.py

Issue 1374223004: Revert of Temporary fix for codereview cert issue. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/upload.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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 client_private_key_file, 572 client_private_key_file,
573 private_key_password=None, 573 private_key_password=None,
574 extra_headers=None, 574 extra_headers=None,
575 maxtries=None): 575 maxtries=None):
576 576
577 if private_key_password is None: # '' means 'empty password' 577 if private_key_password is None: # '' means 'empty password'
578 private_key_password = 'notasecret' 578 private_key_password = 'notasecret'
579 579
580 self.url = url.rstrip('/') 580 self.url = url.rstrip('/')
581 bot_url = self.url 581 bot_url = self.url
582 # TODO(tandrii): remove temp fix due to cert problem: crbug/537763
583 if bot_url.endswith('codereview.chromium.org'):
584 bot_url = 'https://chromiumcodereview.appspot.com'
585 if self.url.endswith('googleplex.com'): 582 if self.url.endswith('googleplex.com'):
586 bot_url = self.url + '/bots' 583 bot_url = self.url + '/bots'
587 584
588 with open(client_private_key_file, 'rb') as f: 585 with open(client_private_key_file, 'rb') as f:
589 client_private_key = f.read() 586 client_private_key = f.read()
590 logging.info('Using OAuth login: %s' % client_email) 587 logging.info('Using OAuth login: %s' % client_email)
591 self.rpc_server = OAuthRpcServer(bot_url, 588 self.rpc_server = OAuthRpcServer(bot_url,
592 client_email, 589 client_email,
593 client_private_key, 590 client_private_key,
594 private_key_password=private_key_password, 591 private_key_password=private_key_password,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 self, issue, patchset, reason, clobber, revision, builders_and_tests, 717 self, issue, patchset, reason, clobber, revision, builders_and_tests,
721 master=None, category='cq'): 718 master=None, category='cq'):
722 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 719 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
723 (builders_and_tests, issue)) 720 (builders_and_tests, issue))
724 721
725 def trigger_distributed_try_jobs( # pylint:disable=R0201 722 def trigger_distributed_try_jobs( # pylint:disable=R0201
726 self, issue, patchset, reason, clobber, revision, masters, 723 self, issue, patchset, reason, clobber, revision, masters,
727 category='cq'): 724 category='cq'):
728 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 725 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
729 (masters, issue)) 726 (masters, issue))
OLDNEW
« no previous file with comments | « no previous file | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698