summaryrefslogtreecommitdiff
path: root/python/examples/api/server
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/api/server')
-rwxr-xr-xpython/examples/api/server8
1 files changed, 2 insertions, 6 deletions
diff --git a/python/examples/api/server b/python/examples/api/server
index 3103dd795a..0500e6f380 100755
--- a/python/examples/api/server
+++ b/python/examples/api/server
@@ -44,16 +44,12 @@ if opts.verbose:
else:
enable("qpid", WARN)
-url = URL(opts.broker)
if args:
addr = args.pop(0)
else:
parser.error("address is required")
-# XXX: should make URL default the port for us
-conn = Connection(url.host, url.port,
- username=url.user,
- password=url.password,
+conn = Connection(opts.broker,
reconnect=opts.reconnect,
reconnect_interval=opts.reconnect_interval,
reconnect_limit=opts.reconnect_limit)
@@ -75,7 +71,7 @@ def dispatch(msg):
return result
try:
- conn.connect()
+ conn.open()
ssn = conn.session()
rcv = ssn.receiver(addr)