Server setup:
- python 2.7.1
- centos 5.5
Client setup
- python 2.7.1
- rbtools 0.4.1
Note
- problem only occurs when a username is not specified on the command line or in the rc file.
post-review --parent=${review_hash}
Traceback (most recent call last):
File "/usr/local/bin/post-review", line 9, in <module>
load_entry_point('RBTools==0.4.1.dev', 'console_scripts', 'post-review')()
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 1222, in main
if not server.check_api_version():
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 226, in check_api_version
root_resource = self.api_get('api/')
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 669, in api_get
return self.process_json(self.http_get(path))
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 639, in http_get
rsp = urllib2.urlopen(url).read()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
response = meth(req, response)
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 97, in http_response
response.info())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 432, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 884, in http_error_401
url, req, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 859, in http_error_auth_reqed
response = self.retry_http_basic_auth(host, req, realm)
File "/Library/Python/2.7/site-packages/RBTools-0.4.1.dev-py2.7.egg/rbtools/postreview.py", line 129, in retry_http_basic_auth
if response.code != 401:
AttributeError: 'NoneType' object has no attribute 'code'
Git bisect led me to https://github.com/reviewboard/rbtools/commit/c27a1e2827f8b2fc7e2a0d4bf6b0e450ccb64c6a being the culprit where the realm is being compared to a hard coded string 'Web API'.