We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37e7a28 commit e46b4f5Copy full SHA for e46b4f5
test/test_replica_set_connection.py
@@ -73,10 +73,10 @@ def setUp(self):
73
for h in response.get("arbiters", [])])
74
75
repl_set_status = conn.admin.command('replSetGetStatus')
76
- primary_info = next(
+ primary_info = [
77
m for m in repl_set_status['members']
78
if m['stateStr'] == 'PRIMARY'
79
- )
+ ][0]
80
81
self.primary = _partition_node(primary_info['name'])
82
else:
0 commit comments