http://reviews.reviewboard.org/
What version are you running?
RBTools 0.3.2
What's the URL of the page this enhancement relates to, if any?
NA
Describe the enhancement and the motivation for it.
For end user tools (front end and CLI), errors should be informative and handled cleanly as not doing so creates noise for the admin. When an incorrect password is provided to post-review, instead of getting an error message, the user is given a traceback. A better user experience would catch the ValueError exception and give the user an error like "Login failed. Please check your password or contact your ReviewBoard administrator."
What steps will reproduce the problem?
1. Remove $HOME/.post-review-cookies.txt
2. Create a change.
2. Execute post-review to post changes.
3. Enter an incorrect password.
What operating system are you using? What browser?
$ lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.2 (Final)
Release: 5.2
Codename: Final
Please provide any additional information below.
We're using LDAP for authentication. This is the traceback:
"""
Traceback (most recent call last):
File "/usr/bin/post-review", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 3741, in main
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 434, in check_api_version
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 876, in api_get
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 846, in http_get
File "/usr/lib64/python2.4/urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "/usr/lib64/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 317, in http_response
File "/usr/lib64/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/urllib2.py", line 741, in http_error_401
host, req, headers)
File "/usr/lib64/python2.4/urllib2.py", line 720, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 339, in retry_http_basic_auth
File "/usr/lib64/python2.4/urllib2.py", line 730, in retry_http_basic_auth
return self.parent.open(req)
File "/usr/lib64/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 317, in http_response
File "/usr/lib64/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/urllib2.py", line 916, in http_error_401
host, req, headers)
File "/usr/lib64/python2.4/urllib2.py", line 807, in http_error_auth_reqed
raise ValueError("AbstractDigestAuthHandler doesn't know "
ValueError: AbstractDigestAuthHandler doesn't know about Basic
"""