File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,13 @@ from pymongo.hello import HelloCompat
29
29
from pymongo .mongo_client import MongoClient
30
30
31
31
client = MongoClient ()
32
-
33
- # If the deployment is a replica set, connect to the whole set.
34
- replica_set_name = client .admin .command (HelloCompat .LEGACY_CMD ).get ('setName' )
35
- if replica_set_name :
36
- client = MongoClient (replicaSet = replica_set_name )
37
-
38
32
collection = client .test .test
39
-
40
33
ndocs = 20
41
-
42
34
collection .drop ()
43
35
collection .insert_many ([{'i' : i } for i in range (ndocs )])
44
- client .close () # Discard main thread's request socket.
36
+ client .close () # Discard main thread's request socket.
37
+ client = MongoClient ()
38
+ collection = client .test .test
45
39
46
40
try :
47
41
from mod_wsgi import version as mod_wsgi_version
You can’t perform that action at this time.
0 commit comments