@@ -427,12 +427,13 @@ def _connection_string(h, authenticate):
427427 return "mongodb://%s" % (str (h ),)
428428
429429
430- def _mongo_client (host , port , authenticate = True , direct = False , ** kwargs ):
430+ def _mongo_client (host , port , authenticate = True , directConnection = False ,
431+ ** kwargs ):
431432 """Create a new client over SSL/TLS if necessary."""
432433 host = host or client_context .host
433434 port = port or client_context .port
434435 client_options = client_context .default_client_options .copy ()
435- if client_context .replica_set_name and not direct :
436+ if client_context .replica_set_name and not directConnection :
436437 client_options ['replicaSet' ] = client_context .replica_set_name
437438 client_options .update (kwargs )
438439
@@ -444,12 +445,13 @@ def _mongo_client(host, port, authenticate=True, direct=False, **kwargs):
444445
445446def single_client_noauth (h = None , p = None , ** kwargs ):
446447 """Make a direct connection. Don't authenticate."""
447- return _mongo_client (h , p , authenticate = False , direct = True , ** kwargs )
448+ return _mongo_client (h , p , authenticate = False ,
449+ directConnection = True , ** kwargs )
448450
449451
450452def single_client (h = None , p = None , ** kwargs ):
451453 """Make a direct connection, and authenticate if necessary."""
452- return _mongo_client (h , p , direct = True , ** kwargs )
454+ return _mongo_client (h , p , directConnection = True , ** kwargs )
453455
454456
455457def rs_client_noauth (h = None , p = None , ** kwargs ):
0 commit comments