summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorBruno ReniƩ <brutasse@gmail.com>2014-08-29 15:23:48 +0200
committerBruno ReniƩ <brutasse@gmail.com>2014-08-29 15:23:48 +0200
commit2a220e11003eb26971519a73e020d4759e2b3a31 (patch)
tree235104f553fd91d97b84acc07dec681a06b8b642 /kafka/client.py
parent9c83b2bd764f494c3d3a074054914a2b5fd99328 (diff)
downloadkafka-python-2a220e11003eb26971519a73e020d4759e2b3a31.tar.gz
Fix more tests, only multiprocessing consumer ones remaining
Diffstat (limited to 'kafka/client.py')
-rw-r--r--kafka/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kafka/client.py b/kafka/client.py
index e098470..410573a 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -145,7 +145,7 @@ class KafkaClient(object):
# For each broker, send the list of request payloads
for broker, payloads in payloads_by_broker.items():
- conn = self._get_conn(broker.host, broker.port)
+ conn = self._get_conn(broker.host.decode('utf-8'), broker.port)
requestId = self._next_id()
request = encoder_fn(client_id=self.client_id,
correlation_id=requestId, payloads=payloads)
@@ -233,8 +233,8 @@ class KafkaClient(object):
A reinit() has to be done on the copy before it can be used again
"""
c = copy.deepcopy(self)
- for k, v in c.conns.items():
- c.conns[k] = v.copy()
+ for key in c.conns:
+ c.conns[key] = self.conns[key].copy()
return c
def reinit(self):