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

Unified Diff: rietveld.py

Issue 10914068: Enable anonymous apply_issue behavior by default and only fall back to login when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Update help Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apply_issue.py ('k') | third_party/upload.py » ('j') | third_party/upload.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rietveld.py
diff --git a/rietveld.py b/rietveld.py
index 8f95a5db2f3dee682cd8cbae153985027a584f78..fd00e93ab013b892b654e35c08fe6ed0ca91bbee 100644
--- a/rietveld.py
+++ b/rietveld.py
@@ -46,12 +46,11 @@ class Rietveld(object):
get_creds,
extra_headers=extra_headers or {})
else:
- self.rpc_server = upload.GetRpcServer(url, email)
- # If email is given as an empty string, then assume we want to make
- # requests that do not need authentication. Bypass authentication by
- # setting the flag to True.
if email == '':
- self.rpc_server.authenticated = True
+ get_creds = lambda: (email, None)
+ self.rpc_server = upload.HttpRpcServer(url, get_creds)
+ else:
+ self.rpc_server = upload.GetRpcServer(url, email)
self._xsrf_token = None
self._xsrf_token_time = None
« no previous file with comments | « apply_issue.py ('k') | third_party/upload.py » ('j') | third_party/upload.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698