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

Side by Side Diff: rietveld.py

Issue 221423007: Fix upload.py to properly use a local logger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: 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 | 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 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 # Hack out upload logging.info() 33 upload.LOGGER.setLevel(logging.WARNING) # pylint: disable=E1103
34 upload.logging = logging.getLogger('upload')
35 # Mac pylint choke on this line.
36 upload.logging.setLevel(logging.WARNING) # pylint: disable=E1103
37 34
38 35
39 class Rietveld(object): 36 class Rietveld(object):
40 """Accesses rietveld.""" 37 """Accesses rietveld."""
41 def __init__(self, url, email, password, extra_headers=None): 38 def __init__(self, url, email, password, extra_headers=None):
42 self.url = url.rstrip('/') 39 self.url = url.rstrip('/')
43 # Email and password are accessed by commit queue, keep them. 40 # Email and password are accessed by commit queue, keep them.
44 self.email = email 41 self.email = email
45 self.password = password 42 self.password = password
46 # TODO(maruel): It's not awesome but maybe necessary to retrieve the value. 43 # TODO(maruel): It's not awesome but maybe necessary to retrieve the value.
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 def trigger_try_jobs( # pylint:disable=R0201 693 def trigger_try_jobs( # pylint:disable=R0201
697 self, issue, patchset, reason, clobber, revision, builders_and_tests, 694 self, issue, patchset, reason, clobber, revision, builders_and_tests,
698 master=None): 695 master=None):
699 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 696 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
700 (builders_and_tests, issue)) 697 (builders_and_tests, issue))
701 698
702 def trigger_distributed_try_jobs( # pylint:disable=R0201 699 def trigger_distributed_try_jobs( # pylint:disable=R0201
703 self, issue, patchset, reason, clobber, revision, masters): 700 self, issue, patchset, reason, clobber, revision, masters):
704 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' % 701 logging.info('ReadOnlyRietveld: triggering try jobs %r for issue %d' %
705 (masters, issue)) 702 (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