|
|
|
@ -87,15 +87,21 @@ def main():
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
if properties is None:
|
|
|
|
if properties is None:
|
|
|
|
if options.email is not None:
|
|
|
|
if options.email is not None:
|
|
|
|
try:
|
|
|
|
|
|
|
|
obj = rietveld.Rietveld(options.server, options.email, options.password)
|
|
|
|
obj = rietveld.Rietveld(options.server, options.email, options.password)
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
properties = obj.get_issue_properties(options.issue, False)
|
|
|
|
except rietveld.upload.ClientLoginError, e:
|
|
|
|
except rietveld.upload.ClientLoginError, e:
|
|
|
|
if sys.stdout.closed:
|
|
|
|
if sys.stdout.closed:
|
|
|
|
print('Accessing the issue requires proper credentials.')
|
|
|
|
print('Accessing the issue requires proper credentials.')
|
|
|
|
return 1
|
|
|
|
return 1
|
|
|
|
|
|
|
|
else:
|
|
|
|
print('Accessing the issue requires login.')
|
|
|
|
print('Accessing the issue requires login.')
|
|
|
|
obj = rietveld.Rietveld(options.server, None, None)
|
|
|
|
obj = rietveld.Rietveld(options.server, None, None)
|
|
|
|
|
|
|
|
try:
|
|
|
|
properties = obj.get_issue_properties(options.issue, False)
|
|
|
|
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:
|
|
|
|
if not options.patchset:
|
|
|
|
options.patchset = properties['patchsets'][-1]
|
|
|
|
options.patchset = properties['patchsets'][-1]
|
|
|
|
|