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

Unified Diff: apply_issue.py

Issue 11024009: Fix private issues, take two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: 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 | « no previous file | no next file » | 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 0e27380ade5bee9727c6d90ccceeef20c67a2b8e..72414e93061ca1e980afdf9db28c1d5a1cabcada 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -87,15 +87,21 @@ def main():
pass
if properties is None:
if options.email is not None:
+ obj = rietveld.Rietveld(options.server, options.email, options.password)
try:
- obj = rietveld.Rietveld(options.server, options.email, options.password)
+ properties = obj.get_issue_properties(options.issue, False)
except rietveld.upload.ClientLoginError, e:
if sys.stdout.closed:
print('Accessing the issue requires proper credentials.')
return 1
- print('Accessing the issue requires login.')
- obj = rietveld.Rietveld(options.server, None, None)
- properties = obj.get_issue_properties(options.issue, False)
+ else:
+ print('Accessing the issue requires login.')
+ obj = rietveld.Rietveld(options.server, None, None)
+ try:
+ properties = obj.get_issue_properties(options.issue, False)
+ except rietveld.upload.ClientLoginError, e:
+ print('Accessing the issue requires proper credentials.')
+ return 1
if not options.patchset:
options.patchset = properties['patchsets'][-1]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698