diff options
Diffstat (limited to 'kafka/client.py')
-rw-r--r-- | kafka/client.py | 6 |
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): |