Chromium Code Reviews| Index: apply_issue.py |
| =================================================================== |
| --- apply_issue.py (revision 157107) |
| +++ apply_issue.py (working copy) |
| @@ -27,10 +27,12 @@ |
| '-v', '--verbose', action='count', default=0, |
| help='Prints debugging infos') |
| parser.add_option( |
| - '-e', |
| - '--email', |
| - help='IGNORED: Kept for compatibility.') |
| + '-e', '--email', default='', |
| + help='Email address to access rietveld. If not specified, anonymous ' |
| + 'access will be used.') |
| parser.add_option( |
| + '-w', '--password', default=None, help='Password for email addressed.') |
| + parser.add_option( |
| '-i', '--issue', type='int', help='Rietveld issue number') |
| parser.add_option( |
| '-p', '--patchset', type='int', help='Rietveld issue\'s patchset number') |
| @@ -57,16 +59,15 @@ |
| if not options.server: |
| parser.error('Require a valid server') |
| - obj = rietveld.Rietveld(options.server, '', None) |
| + obj = rietveld.Rietveld(options.server, options.email, options.password) |
| try: |
| properties = obj.get_issue_properties(options.issue, False) |
| except rietveld.upload.ClientLoginError, e: |
| if sys.stdout.closed: |
| print >> sys.stderr, 'Accessing the issue requires login.' |
| - 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.') |
|
M-A Ruel
2012/09/17 23:13:27
I'd prefer to keep the fallback.
Roger Tawa OOO till Jul 10th
2012/09/18 14:31:35
Agreed. I was thinking that ('',None) was the sam
|
| + return 1 |
| if not options.patchset: |
| options.patchset = properties['patchsets'][-1] |