PYTHON-752 - Fix escaping in __simple_command.

This commit is contained in:
Bernie Hackett 2014-09-24 12:28:56 -07:00
parent 0fb2fcfac0
commit 1e4b0c5a12
2 changed files with 2 additions and 2 deletions

View File

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

View File

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