Skip to content

Commit fe97bd1

Browse files
committed
Better replica set error message.
1 parent 13be82d commit fe97bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def __try_node(self, node):
554554
return self.__try_node(candidate)
555555

556556
# Explain why we aren't using this connection.
557-
raise AutoReconnect('%s:%d is currently a secondary' % node)
557+
raise AutoReconnect('%s:%d is not primary or master' % node)
558558

559559
# Direct connection
560560
if response.get("arbiterOnly", False):

0 commit comments

Comments
 (0)