niwibe/py-couchdb — pull request #3 by tpltnt (2013-03-17 18:28:24+00:00)
Title: raising HTTPError added to indicate missing credentials

Hi niwibe,

if you create a database object without providing proper credentials, querying fails with a rather non-descriptive
> File "/usr/lib/python3.3/site-packages/pycouchdb/client.py", line 448, in _query
> for row in utils.as_json(r)["rows"]:
> KeyError: 'rows'

This patch raises a HTTPError, if couchdb replies with a non 2XX status code.
Cheers,
tpltnt