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