diff --git a/mongo.py b/mongo.py index dd1db648f..775c4cf9a 100644 --- a/mongo.py +++ b/mongo.py @@ -653,7 +653,8 @@ class Cursor(object): """Refreshes the cursor with more data from Mongo. Returns the length of self.__data after refresh. Will exit early if - self.__data is already non-empty. + self.__data is already non-empty. Raises DatabaseException when the + cursor cannot be refreshed due to an error on the query. """ if len(self.__data) or self.__killed: return len(self.__data) @@ -663,8 +664,14 @@ class Cursor(object): request_id = self.__collection._send_message(operation, message) response = self.__collection.database()._receive_message(1, request_id) - # TODO handle non-zero response flags - assert struct.unpack("