Skip to content

Commit

Permalink
assert expected type of response from CouchDB
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankoegl committed Jul 24, 2013
1 parent 3d3b8c4 commit d46142b
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 d46142b

Please sign in to comment.