Skip to content

Commit 63c8fd3

Browse files
committed
PYTHON-1060 - Remove command document repr from exception messages
1 parent 98dcaa2 commit 63c8fd3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pymongo/network.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ def command(sock, dbname, spec, slave_ok, is_mongos,
9696

9797
response_doc = unpacked['data'][0]
9898
if check:
99-
msg = "command %s on namespace %s failed: %%s" % (
100-
repr(spec).replace("%", "%%"), ns)
101-
helpers._check_command_response(response_doc, msg, allowable_errors)
99+
helpers._check_command_response(response_doc, None, allowable_errors)
102100
except Exception as exc:
103101
if publish:
104102
duration = (datetime.datetime.now() - start) + encoding_duration

0 commit comments

Comments
 (0)