Skip to content

Commit 14a0c7b

Browse files
author
A. Jesse Jiryu Davis
committed
Remove dead code
1 parent 98ac3d3 commit 14a0c7b

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

pymongo/replica_set_connection.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,9 @@
5656
OperationFailure)
5757

5858

59-
if sys.platform.startswith('java'):
60-
from select import cpython_compatible_select as select
61-
else:
62-
from select import select
63-
64-
6559
MAX_BSON_SIZE = 4 * 1024 * 1024
6660

6761

68-
def _closed(sock):
69-
"""Return True if we know socket has been closed, False otherwise.
70-
"""
71-
try:
72-
readers, _, _ = select([sock], [], [], 0)
73-
# Any exception here is equally bad (select.error, ValueError, etc.).
74-
except Exception:
75-
return True
76-
return len(readers) > 0
77-
78-
7962
def _partition_node(node):
8063
"""Split a host:port string returned from mongod/s into
8164
a (host, int(port)) pair needed for socket.connect().

0 commit comments

Comments
 (0)