Add extra_headers to Rietveld.
It's needed to start a mapreduce on GAE with this class.
[email protected]
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
diff --git a/rietveld.py b/rietveld.py
index b2284bb..0cf6ed1 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -40,14 +40,15 @@
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