MXS-1271: Remove unnecessary encode call
The trailing newline can be removed from the string without encoding it first.
This commit is contained in:
@ -38,7 +38,7 @@ while True:
|
|||||||
if len(buf) == 0:
|
if len(buf) == 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
data = buf.encode().strip()
|
data = buf[:-1]
|
||||||
producer.send(topic=opts.kafka_topic, value=data)
|
producer.send(topic=opts.kafka_topic, value=data)
|
||||||
producer.flush()
|
producer.flush()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user