[fix][doc] Adjust python example in cpp client directory to fix string interpolation
@@ -64,14 +64,15 @@ To install the Python bindings:
import pulsar
client = pulsar.Client('pulsar://localhost:6650')
+
consumer = client.subscribe('my-topic', 'my-subscription')
while True:
msg = consumer.receive()
try:
- print("Received message '%s' id='%s'", msg.data().decode('utf-8'), msg.message_id())
+ print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
consumer.acknowledge(msg)
- except:
+ except Exception:
consumer.negative_acknowledge(msg)
client.close()
