PROTON-2155: Switch helloworld.py back to connect with args
diff --git a/python/examples/helloworld.py b/python/examples/helloworld.py
index 5b88462..7a91aa4 100755
--- a/python/examples/helloworld.py
+++ b/python/examples/helloworld.py
@@ -24,12 +24,13 @@
from proton.reactor import Container
class HelloWorld(MessagingHandler):
- def __init__(self, address):
+ def __init__(self, server, address):
super(HelloWorld, self).__init__()
+ self.server = server
self.address = address
def on_start(self, event):
- conn = event.container.connect()
+ conn = event.container.connect(self.server)
event.container.create_receiver(conn, self.address)
event.container.create_sender(conn, self.address)
@@ -41,4 +42,4 @@
print(event.message.body)
event.connection.close()
-Container(HelloWorld("examples")).run()
+Container(HelloWorld("localhost:5672", "examples")).run()