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
experimental/szager/collated-output
maruel@chromium.org 14 years ago
parent 9f90f807ad
commit 794a4f16f7

@ -40,14 +40,15 @@ upload.logging.setLevel(logging.WARNING) # pylint: disable=E1103
class Rietveld(object):
"""Accesses rietveld."""
def __init__(self, url, email, password):
def __init__(self, url, email, password, extra_headers=None):
self.issue = None
self.url = url
if email and password:
get_creds = lambda: (email, password)
self.rpc_server = upload.HttpRpcServer(
self.url,
get_creds)
get_creds,
extra_headers=extra_headers)
else:
self.rpc_server = upload.GetRpcServer(url, email)
self._xsrf_token = None

Loading…
Cancel
Save