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

Unified Diff: third_party/upload.py

Issue 20634003: Add anonymous-only option to apply_issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: use --no-auth Created 7 years, 5 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 | « rietveld.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/upload.py
diff --git a/third_party/upload.py b/third_party/upload.py
index b2a5193ad850204070059bf9b549bae497a14c7e..744f3d6794d9c1010b1b3cc0b853df3d91aa5116 100755
--- a/third_party/upload.py
+++ b/third_party/upload.py
@@ -424,7 +424,7 @@ class AbstractRpcServer(object):
"""
# TODO: Don't require authentication. Let the server say
# whether it is necessary.
- if not self.authenticated:
+ if not self.authenticated and self.auth_function:
self._Authenticate()
old_timeout = socket.getdefaulttimeout()
@@ -451,6 +451,8 @@ class AbstractRpcServer(object):
if tries > 3:
raise
elif e.code == 401 or e.code == 302:
+ if not self.auth_function:
+ raise
self._Authenticate()
elif e.code == 301:
# Handle permanent redirect manually.
« no previous file with comments | « rietveld.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698