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

Unified Diff: apply_issue.py

Issue 10908063: Fix apply_issue.py to work on python 2.6. (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 | rietveld.py » ('j') | rietveld.py » ('J')
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 3d606466e710afdeaa1a4c0bad0a2eb0f34566f6..22018742d45a860fa51a3eac9f4cad72da06fe08 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -59,8 +59,11 @@ def main():
obj = rietveld.Rietveld(options.server, '', None)
try:
properties = obj.get_issue_properties(options.issue, False)
- except rietveld.upload.ClientLoginError:
- # Requires login.
+ except rietveld.upload.ClientLoginError, e:
+ if sys.stdout.closed:
+ print >> sys.stderr, 'Accessing the issue requires login.'
M-A Ruel 2012/09/03 17:34:25 Hopefully, this should refrain from causing times
+ return 1
+ print('Accessing the issue requires login.')
obj = rietveld.Rietveld(options.server, None, None)
properties = obj.get_issue_properties(options.issue, False)
@@ -86,7 +89,7 @@ def main():
elif scm_type == 'git':
scm_obj = checkout.GitCheckoutBase(options.root_dir, None, None)
elif scm_type == None:
- scm_obj = checkout.RawCheckout(options.root_dir, None)
+ scm_obj = checkout.RawCheckout(options.root_dir, None, None)
else:
parser.error('Couldn\'t determine the scm')
« no previous file with comments | « no previous file | rietveld.py » ('j') | rietveld.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698