don't forget to call superclass __init__
This commit is contained in:

committed by
David Arthur

parent
3ba54c6e05
commit
4ccfa5ce76
@@ -17,6 +17,7 @@ class KafkaConnection(local):
|
||||
since the Kafka API includes a correlation id.
|
||||
"""
|
||||
def __init__(self, host, port, bufsize=4096):
|
||||
super(KafkaConnection, self).__init__()
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.bufsize = bufsize
|
||||
|
@@ -31,7 +31,8 @@ class RoundRobinPartitioner(Partitioner):
|
||||
in a round robin fashion
|
||||
"""
|
||||
def __init__(self, partitions):
|
||||
self._set_partitions(partitions)
|
||||
super(RoundRobinPartitioner, self).__init__(partitions)
|
||||
self.iterpart = cycle(partitions)
|
||||
|
||||
def _set_partitions(self, partitions):
|
||||
self.partitions = partitions
|
||||
|
Reference in New Issue
Block a user