summaryrefslogtreecommitdiff
path: root/qpid/python/examples/api/spout
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/python/examples/api/spout')
-rwxr-xr-xqpid/python/examples/api/spout8
1 files changed, 2 insertions, 6 deletions
diff --git a/qpid/python/examples/api/spout b/qpid/python/examples/api/spout
index 9e5759b2dd..dacebb5d1a 100755
--- a/qpid/python/examples/api/spout
+++ b/qpid/python/examples/api/spout
@@ -65,7 +65,6 @@ if opts.verbose:
else:
enable("qpid", WARN)
-url = URL(opts.broker)
if opts.id is None:
spout_id = str(uuid4())
else:
@@ -92,15 +91,12 @@ if opts.entries:
else:
content = text
-# 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)
try:
- conn.connect()
+ conn.open()
ssn = conn.session()
snd = ssn.sender(addr)