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

Unified Diff: apply_issue.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 | « no previous file | rietveld.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apply_issue.py
diff --git a/apply_issue.py b/apply_issue.py
index 30748fd7564314c2357525e63e6c9fd0034a3107..d98e9ba59deac16ae6c742f36215d3d180541b9f 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -65,6 +65,8 @@ def main():
'--server',
default='http://codereview.chromium.org',
help='Rietveld server')
+ parser.add_option('--no-auth', action='store_true',
+ help='Do not attempt authenticated requests.')
options, args = parser.parse_args()
logging.basicConfig(
format='%(levelname)5s %(module)11s(%(lineno)4d): %(message)s',
@@ -96,6 +98,8 @@ def main():
except urllib2.HTTPError, e:
if e.getcode() != 302:
raise
+ elif options.no_auth:
+ exit('FAIL: Login detected -- is issue private?')
# TODO(maruel): A few 'Invalid username or password.' are printed first, we
# should get rid of those.
except rietveld.upload.ClientLoginError, e:
« no previous file with comments | « no previous file | rietveld.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698