Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3114 by yaneg...@gmail.com: `rbt post' prompts for username even if --username if provided; `post-review --username` doesn't
http://code.google.com/p/reviewboard/issues/detail?id=3114

What version are you running?

$ post-review --version
RBTools 0.5.2
$ git ls-remote origin HEAD
834103615b50ab63f0fcd56dab8eba2fccde5659        HEAD

What's the URL of the page containing the problem?

n/a

What steps will reproduce the problem?

1. rbt post --username foo

What is the expected output? What do you see instead?

I should not be prompted for a password (post-review doesn't prompt me for
one).

What operating system are you using? What browser?

$ uname -a
CYGWIN_NT-6.1 ZL00757 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 Cygwin

Please provide any additional information below.

garrett.cooper@ZL00757 ~/git/rbtools~
$ post-review --username yaneurabeya --diff-filename 0002-Don-t-bomb-out-if-a-password-wasn-t-provided.patch
==> HTTP Authentication Required
Enter authorization information for "Web API" at reviews.reviewboard.org
Password: Traceback (most recent call last):
  File "/usr/bin/post-review", line 8, in <module>
load_entry_point('RBTools==0.5.2.dev', 'console_scripts', 'post-review')() File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 1314, in main
    server.load_capabilities()
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 274, in load_capabilities
    info = self.api_get('api/info/')
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 705, in api_get
    return self.process_json(self.http_get(path))
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 675, in http_get
    rsp = urllib2.urlopen(url).read()
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 402, in open
    req = meth(req)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 80, in http_request
    self.password_mgr.find_user_password('Web API', self.url)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/postreview.py", line 180, in find_user_password
    self.rb_pass = getpass.getpass('Password: ')
  File "/usr/lib/python2.7/getpass.py", line 71, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "/usr/lib/python2.7/getpass.py", line 133, in _raw_input
    line = input.readline()
KeyboardInterrupt

garrett.cooper@ZL00757 ~/git/rbtools~
$ rbt post --username yaneurabeya --diff-filename 0002-Don-t-bomb-out-if-a-password-wasn-t-provided.patch
==> HTTP Authentication Required
Enter authorization information for "Web API" at reviews.reviewboard.org
Username: Traceback (most recent call last):
  File "/usr/bin/rbt", line 8, in <module>
    load_entry_point('RBTools==0.5.2.dev', 'console_scripts', 'rbt')()
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/commands/main.py", line 106, in main
    command.run_from_argv([RB_MAIN] + args)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/commands/__init__.py", line 157, in run_from_argv
    exit_code = self.main(*args) or 0
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/commands/post.py", line 464, in main
    api_client, api_root = self.get_api(server_url)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/commands/__init__.py", line 255, in get_api
    api_root = api_client.get_root()
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/client.py", line 16, in get_root
    return self._transport.get_root(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/transport/sync.py", line 35, in get_root
    return self._execute_request(HttpRequest(self.server.url))
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/transport/sync.py", line 69, in _execute_request
    rsp = self.server.make_request(request)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/request.py", line 413, in make_request
    rsp = urllib2.urlopen(r)
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 402, in open
    req = meth(req)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/request.py", line 151, in http_request
    self.password_mgr.find_user_password('Web API', self.url)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/api/request.py", line 235, in find_user_password
    username, password = self.auth_callback(realm, uri)
File "/usr/lib/python2.7/site-packages/RBTools-0.5.2.dev-py2.7.egg/rbtools/commands/__init__.py", line 230, in credentials_prompt
    username = raw_input()
KeyboardInterrupt

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to