Skip to content
Browse files

Merge pull request #50 from rafikk/master

`None` should be an acceptable value for limit
  • Loading branch information...
2 parents 2fa1288 + dcc032e commit bf6919a956ef14cff9065bfeb2134a75882cce72 @jehiah jehiah committed Aug 18, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 asyncmongo/cursor.py
View
5 asyncmongo/cursor.py
@@ -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):

0 comments on commit bf6919a

Please sign in to comment.
Something went wrong with that request. Please try again.