Commit a73435aa authored by maruel@chromium.org's avatar maruel@chromium.org

Fix private issues, take two.

The object creation order was wrong

TBR=rogerta@chromium.org
BUG=149941


Review URL: https://chromiumcodereview.appspot.com/11024009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159524 0039d316-1c4b-4281-b951-d872f2087c98
parent 0aca0f96
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment