Commit 794a4f16 authored by maruel@chromium.org's avatar maruel@chromium.org

Add extra_headers to Rietveld.

It's needed to start a mapreduce on GAE with this class.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7076016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87010 0039d316-1c4b-4281-b951-d872f2087c98
parent 9f90f807
...@@ -40,14 +40,15 @@ upload.logging.setLevel(logging.WARNING) # pylint: disable=E1103 ...@@ -40,14 +40,15 @@ upload.logging.setLevel(logging.WARNING) # pylint: disable=E1103
class Rietveld(object): class Rietveld(object):
"""Accesses rietveld.""" """Accesses rietveld."""
def __init__(self, url, email, password): def __init__(self, url, email, password, extra_headers=None):
self.issue = None self.issue = None
self.url = url self.url = url
if email and password: if email and password:
get_creds = lambda: (email, password) get_creds = lambda: (email, password)
self.rpc_server = upload.HttpRpcServer( self.rpc_server = upload.HttpRpcServer(
self.url, self.url,
get_creds) get_creds,
extra_headers=extra_headers)
else: else:
self.rpc_server = upload.GetRpcServer(url, email) self.rpc_server = upload.GetRpcServer(url, email)
self._xsrf_token = None self._xsrf_token = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment