summaryrefslogtreecommitdiff
path: root/kafka/client.py
diff options
context:
space:
mode:
authorBruno ReniƩ <brutasse@gmail.com>2014-08-29 15:23:48 +0200
committerMark Roberts <wizzat@fb.com>2014-09-03 09:55:45 -0700
commit81f51b9b284d750f5e5added2f2c4bd773acd604 (patch)
tree235104f553fd91d97b84acc07dec681a06b8b642 /kafka/client.py
parentab80fa8283dc938e354d094e34fb0e86b5316ea4 (diff)
downloadkafka-python-81f51b9b284d750f5e5added2f2c4bd773acd604.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):