MXS-1271: Remove unnecessary encode call

The trailing newline can be removed from the string without encoding it
first.
This commit is contained in:
Markus Mäkelä 2017-06-17 08:24:58 +03:00
parent b7a6e4b7b0
commit 469ed1de1b

View File

@ -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()