-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.1.1
-
Component/s: None
-
None
-
Environment:Ubuntu 10.04, Amazon
When using ReplicaSetConnection instead of Connection, if an AutoReconnect error is raised (in our case, due to a kill -2 Signal), instead of raising that AutoReconnent, a TypeError is caused; stacktrace below:
/usr/local/lib/python2.6/dist-packages/pymongo/replica_set_connection.py:818:in `_send_message_with_response:'
/usr/local/lib/python2.6/dist-packages/pymongo/replica_set_connection.py:818:in ` raise AutoReconnect(', '.join(errors))'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:616:in `__send_message:'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:616:in ` **kwargs)'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:666:in `_refresh:'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:666:in ` self.__uuid_subtype))'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:703:in `next:'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:703:in ` if len(self.__data) or self._refresh():'
/usr/local/lib/python2.6/dist-packages/pymongo/collection.py:520:in `find_one:'
/usr/local/lib/python2.6/dist-packages/pymongo/collection.py:520:in ` for result in self.find(spec_or_id, *args, **kwargs).limit(-1):'
/usr/local/lib/python2.6/dist-packages/pymongo/database.py:348:in `command:'
/usr/local/lib/python2.6/dist-packages/pymongo/database.py:348:in ` result = self["$cmd"].find_one(command, **extra_opts)'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:534:in `distinct:'
/usr/local/lib/python2.6/dist-packages/pymongo/cursor.py:534:in ` **options)["values"]'
/usr/local/lib/python2.6/dist-packages/pymongo/collection.py:1015:in `distinct:'
/usr/local/lib/python2.6/dist-packages/pymongo/collection.py:1015:in ` return self.find().distinct(key)'