Skip to content
Browse files

None should be an acceptable value for limit

  • Loading branch information...
1 parent 2fa1288 commit dcc032ebaa8971c0f80f756e5e1d4520559b7edf @rafikk rafikk committed Aug 14, 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 dcc032e

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