PYTHON-752 - Fix escaping in __simple_command.
This commit is contained in:
parent
0fb2fcfac0
commit
1e4b0c5a12
@ -689,7 +689,7 @@ class MongoClient(common.BaseObject):
|
||||
|
||||
end = time.time()
|
||||
response = helpers._unpack_response(response)['data'][0]
|
||||
msg = "command %r failed: %%s" % spec
|
||||
msg = "command %s failed: %%s" % repr(spec).replace("%", "%%")
|
||||
helpers._check_command_response(response, None, msg)
|
||||
return response, end - start
|
||||
|
||||
|
||||
@ -1022,7 +1022,7 @@ class MongoReplicaSetClient(common.BaseObject):
|
||||
|
||||
end = time.time()
|
||||
response = helpers._unpack_response(response)['data'][0]
|
||||
msg = "command %r failed: %%s" % spec
|
||||
msg = "command %s failed: %%s" % repr(spec).replace("%", "%%")
|
||||
helpers._check_command_response(response, None, msg)
|
||||
return response, end - start
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user