Skip to content

Commit 7fceb1b

Browse files
committed
Pass host as kwarg to get_sasl_mechanism
1 parent e2b6693 commit 7fceb1b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kafka/conn.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ def __init__(self, host, port, afi, **configs):
256256
for key in self.config:
257257
if key in configs:
258258
self.config[key] = configs[key]
259-
self.config['host'] = host
260259

261260
self.node_id = self.config.pop('node_id')
262261

@@ -314,7 +313,7 @@ def __init__(self, host, port, afi, **configs):
314313

315314
def _init_sasl_mechanism(self):
316315
if self.config['security_protocol'] in ('SASL_PLAINTEXT', 'SASL_SSL'):
317-
self._sasl_mechanism = get_sasl_mechanism(self.config['sasl_mechanism'])(**self.config)
316+
self._sasl_mechanism = get_sasl_mechanism(self.config['sasl_mechanism'])(host=self.host, **self.config)
318317
else:
319318
self._sasl_mechanism = None
320319

0 commit comments

Comments
 (0)