Skip to content

Commit

Permalink
Merge pull request #162 from stefankoegl/issue-145
Browse files Browse the repository at this point in the history
assert expected type of response from CouchDB
  • Loading branch information
benoitc committed Aug 30, 2013
2 parents bf2c691 + d46142b commit 06ea814
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions couchdbkit/client.py
Expand Up @@ -999,6 +999,9 @@ def fetch(self):
self._dynamic_keys = []

self._result_cache = self.fetch_raw().json_body
assert isinstance(self._result_cache, dict), 'received an invalid ' \
'response of type %s: %s' % \
(type(self._result_cache), repr(self._result_cache))
self._total_rows = self._result_cache.get('total_rows')
self._offset = self._result_cache.get('offset', 0)

Expand Down

0 comments on commit 06ea814

Please sign in to comment.