Removed pool_size from connect, minor tidyup

This commit is contained in:
Harry Marr
2010-02-04 01:44:52 +00:00
parent df5b1f3806
commit 89f505bb13
6 changed files with 16 additions and 10 deletions

View File

@@ -520,9 +520,10 @@ class QuerySet(object):
self._collection.update(self._query, update, safe=safe_update,
multi=True)
except pymongo.errors.OperationFailure, err:
if err.message == u'multi not coded yet':
raise OperationError(u'update() method requires MongoDB 1.1.3+')
raise OperationError(u'Update failed (%s)' % err.message)
if unicode(err) == u'multi not coded yet':
message = u'update() method requires MongoDB 1.1.3+'
raise OperationError(message)
raise OperationError(u'Update failed (%s)' % unicode(err))
def update_one(self, safe_update=True, **update):
"""Perform an atomic update on first field matched by the query.