Skip to content

Commit e23d019

Browse files
committed
remove unnecessary changes
1 parent d97a43e commit e23d019

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

pymongo/errors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ def __init__(self, error, code=None, details=None, max_wire_version=None):
154154
self.__details = details
155155
self.__max_wire_version = max_wire_version
156156

157-
def __str__(self):
158-
output_str = "%s, full error: %s" % (self._message, self.__details)
159-
if sys.version_info[0] == 2 and isinstance(output_str, unicode):
160-
return output_str.encode('utf-8', errors='replace')
161-
return output_str
162-
163157
@property
164158
def _max_wire_version(self):
165159
return self.__max_wire_version
@@ -182,6 +176,12 @@ def details(self):
182176
"""
183177
return self.__details
184178

179+
def __str__(self):
180+
output_str = "%s, full error: %s" % (self._message, self.__details)
181+
if sys.version_info[0] == 2 and isinstance(output_str, unicode):
182+
return output_str.encode('utf-8', errors='replace')
183+
return output_str
184+
185185

186186
class CursorNotFound(OperationFailure):
187187
"""Raised while iterating query results if the cursor is

pymongo/pool.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,11 @@ def command(self, dbname, spec, slave_ok=False,
680680
if self.op_msg_enabled:
681681
self._raise_if_not_writable(unacknowledged)
682682
try:
683-
return command(self, dbname, spec,
684-
slave_ok, self.is_mongos, read_preference,
685-
codec_options, session, client, check,
686-
allowable_errors, self.address, check_keys,
687-
listeners, self.max_bson_size, read_concern,
683+
return command(self, dbname, spec, slave_ok,
684+
self.is_mongos, read_preference, codec_options,
685+
session, client, check, allowable_errors,
686+
self.address, check_keys, listeners,
687+
self.max_bson_size, read_concern,
688688
parse_write_concern_error=parse_write_concern_error,
689689
collation=collation,
690690
compression_ctx=self.compression_context,

0 commit comments

Comments
 (0)