remove unnecessary changes

This commit is contained in:
Prashant Mital 2020-07-01 17:24:41 -07:00
parent d97a43ea9b
commit e23d019f9e
No known key found for this signature in database
GPG Key ID: D5A4E9E5CFB4CBD7
2 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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,