Skip to content

Commit e46b4f5

Browse files
A. Jesse Jiryu Davisbehackett
authored andcommitted
Python2.4 compatibility fix for replica set tests
1 parent 37e7a28 commit e46b4f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_replica_set_connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ def setUp(self):
7373
for h in response.get("arbiters", [])])
7474

7575
repl_set_status = conn.admin.command('replSetGetStatus')
76-
primary_info = next(
76+
primary_info = [
7777
m for m in repl_set_status['members']
7878
if m['stateStr'] == 'PRIMARY'
79-
)
79+
][0]
8080

8181
self.primary = _partition_node(primary_info['name'])
8282
else:

0 commit comments

Comments
 (0)