From e23d019f9e1f4fae3a752a6c45528400a01c90a2 Mon Sep 17 00:00:00 2001 From: Prashant Mital Date: Wed, 1 Jul 2020 17:24:41 -0700 Subject: [PATCH] remove unnecessary changes --- pymongo/errors.py | 12 ++++++------ pymongo/pool.py | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pymongo/errors.py b/pymongo/errors.py index 7a6902be8..e5d52bfe3 100644 --- a/pymongo/errors.py +++ b/pymongo/errors.py @@ -154,12 +154,6 @@ class OperationFailure(PyMongoError): self.__details = details self.__max_wire_version = max_wire_version - def __str__(self): - output_str = "%s, full error: %s" % (self._message, self.__details) - if sys.version_info[0] == 2 and isinstance(output_str, unicode): - return output_str.encode('utf-8', errors='replace') - return output_str - @property def _max_wire_version(self): return self.__max_wire_version @@ -182,6 +176,12 @@ class OperationFailure(PyMongoError): """ return self.__details + def __str__(self): + output_str = "%s, full error: %s" % (self._message, self.__details) + if sys.version_info[0] == 2 and isinstance(output_str, unicode): + return output_str.encode('utf-8', errors='replace') + return output_str + class CursorNotFound(OperationFailure): """Raised while iterating query results if the cursor is diff --git a/pymongo/pool.py b/pymongo/pool.py index 166800895..74965620e 100644 --- a/pymongo/pool.py +++ b/pymongo/pool.py @@ -680,11 +680,11 @@ class SocketInfo(object): if self.op_msg_enabled: self._raise_if_not_writable(unacknowledged) try: - return command(self, dbname, spec, - slave_ok, self.is_mongos, read_preference, - codec_options, session, client, check, - allowable_errors, self.address, check_keys, - listeners, self.max_bson_size, read_concern, + return command(self, dbname, spec, slave_ok, + self.is_mongos, read_preference, codec_options, + session, client, check, allowable_errors, + self.address, check_keys, listeners, + self.max_bson_size, read_concern, parse_write_concern_error=parse_write_concern_error, collation=collation, compression_ctx=self.compression_context,