Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
None should be an acceptable value for limit
Browse files Browse the repository at this point in the history
  • Loading branch information
rafikk committed Aug 14, 2012
1 parent 2fa1288 commit dcc032e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asyncmongo/cursor.py
Expand Up @@ -332,12 +332,15 @@ def find(self, spec=None, fields=None, skip=0, limit=0,
if spec is None:
spec = {}

if limit is None:
limit = 0

if not isinstance(spec, dict):
raise TypeError("spec must be an instance of dict")
if not isinstance(skip, int):
raise TypeError("skip must be an instance of int")
if not isinstance(limit, int):
raise TypeError("limit must be an instance of int")
raise TypeError("limit must be an instance of int or None")
if not isinstance(timeout, bool):
raise TypeError("timeout must be an instance of bool")
if not isinstance(snapshot, bool):
Expand Down

0 comments on commit dcc032e

Please sign in to comment.