diff options
author | Dana Powers <dana.powers@rd.io> | 2016-01-01 22:49:34 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2016-01-01 22:49:34 -0800 |
commit | cb1b52f7056591d3964c7e4ba12c8fb21085b135 (patch) | |
tree | 5072ef37c880679abb1736ecffdf032340d8d216 | |
parent | b957de1fd965d1deb43a81c80647bb29b3528c27 (diff) | |
download | kafka-python-cb1b52f7056591d3964c7e4ba12c8fb21085b135.tar.gz |
Use python3 compatible next() in roundrobin assignor
-rw-r--r-- | kafka/coordinator/assignors/roundrobin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kafka/coordinator/assignors/roundrobin.py b/kafka/coordinator/assignors/roundrobin.py index 2927f3e..55b73e1 100644 --- a/kafka/coordinator/assignors/roundrobin.py +++ b/kafka/coordinator/assignors/roundrobin.py @@ -36,14 +36,14 @@ class RoundRobinPartitionAssignor(AbstractPartitionAssignor): member_iter = itertools.cycle(sorted(member_metadata.keys())) for partition in all_topic_partitions: - member_id = member_iter.next() + member_id = next(member_iter) # Because we constructed all_topic_partitions from the set of # member subscribed topics, we should be safe assuming that # each topic in all_topic_partitions is in at least one member # subscription; otherwise this could yield an infinite loop while partition.topic not in member_metadata[member_id].subscription: - member_id = member_iter.next() + member_id = next(member_iter) assignment[member_id][partition.topic].append(partition.partition) protocol_assignment = {} |