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

Side by Side Diff: rietveld.py

Issue 238273011: Fixed reauthentication issue (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Small fixes Created 6 years, 8 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 | no next file » | 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 12 matching lines...) Expand all
23 import urllib 23 import urllib
24 import urllib2 24 import urllib2
25 import urlparse 25 import urlparse
26 26
27 import patch 27 import patch
28 28
29 from third_party import upload 29 from third_party import upload
30 import third_party.oauth2client.client as oa2client 30 import third_party.oauth2client.client as oa2client
31 from third_party import httplib2 31 from third_party import httplib2
32 32
33 # Appengine replies with 302 when authentication fails (sigh.)
34 oa2client.REFRESH_STATUS_CODES.append(302)
33 upload.LOGGER.setLevel(logging.WARNING) # pylint: disable=E1103 35 upload.LOGGER.setLevel(logging.WARNING) # pylint: disable=E1103
34 36
35 37
36 class Rietveld(object): 38 class Rietveld(object):
37 """Accesses rietveld.""" 39 """Accesses rietveld."""
38 def __init__(self, url, email, password, extra_headers=None): 40 def __init__(self, url, email, password, extra_headers=None):
39 self.url = url.rstrip('/') 41 self.url = url.rstrip('/')
40 # Email and password are accessed by commit queue, keep them. 42 # Email and password are accessed by commit queue, keep them.
41 self.email = email 43 self.email = email
42 self.password = password 44 self.password = password
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 def trigger_try_jobs( # pylint:disable=R0201 704 def trigger_try_jobs( # pylint:disable=R0201
703 self, issue, patchset, reason, clobber, revision, builders_and_tests, 705 self, issue, patchset, reason, clobber, revision, builders_and_tests,
704 master=None): 706 master=None):
705 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 707 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
706 (builders_and_tests, issue)) 708 (builders_and_tests, issue))
707 709
708 def trigger_distributed_try_jobs( # pylint:disable=R0201 710 def trigger_distributed_try_jobs( # pylint:disable=R0201
709 self, issue, patchset, reason, clobber, revision, masters): 711 self, issue, patchset, reason, clobber, revision, masters):
710 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 712 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
711 (masters, issue)) 713 (masters, issue))
OLDNEW
« 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