From 967a2434698078ff48a7a3a1f1f8d97dce96427c Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Sat, 13 Dec 2014 10:04:07 -0500 Subject: [PATCH] Unused argument in MasterSlaveConnection._send_message. --- pymongo/master_slave_connection.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pymongo/master_slave_connection.py b/pymongo/master_slave_connection.py index 9a36f87d0..446514926 100644 --- a/pymongo/master_slave_connection.py +++ b/pymongo/master_slave_connection.py @@ -217,12 +217,9 @@ class MasterSlaveConnection(BaseObject): """ self.__master._ensure_connected(sync) - # _connection_to_use is a hack that we need to include to make sure - # that killcursor operations can be sent to the same instance on which - # the cursor actually resides... def _send_message(self, message, with_last_error=False, - command=False, _connection_to_use=None): + command=False): """Say something to Mongo. Sends a message on the Master connection. This is used for inserts, @@ -236,11 +233,8 @@ class MasterSlaveConnection(BaseObject): - `data`: data to send - `safe`: perform a getLastError after sending the message """ - if _connection_to_use is None or _connection_to_use == -1: - return self.__master._send_message(message, - with_last_error, command) - return self.__slaves[_connection_to_use]._send_message( - message, with_last_error, command, check_primary=False) + return self.__master._send_message(message, + with_last_error, command) # _connection_to_use is a hack that we need to include to make sure # that getmore operations can be sent to the same instance on which