Skip to content

Commit 4ccfa5c

Browse files
Vetoshkin Nikitamumrah
authored andcommitted
don't forget to call superclass __init__
1 parent 3ba54c6 commit 4ccfa5c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

kafka/conn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class KafkaConnection(local):
1717
since the Kafka API includes a correlation id.
1818
"""
1919
def __init__(self, host, port, bufsize=4096):
20+
super(KafkaConnection, self).__init__()
2021
self.host = host
2122
self.port = port
2223
self.bufsize = bufsize

kafka/partitioner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class RoundRobinPartitioner(Partitioner):
3131
in a round robin fashion
3232
"""
3333
def __init__(self, partitions):
34-
self._set_partitions(partitions)
34+
super(RoundRobinPartitioner, self).__init__(partitions)
35+
self.iterpart = cycle(partitions)
3536

3637
def _set_partitions(self, partitions):
3738
self.partitions = partitions

0 commit comments

Comments
 (0)