summaryrefslogtreecommitdiff
path: root/python/examples/api
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/api')
-rwxr-xr-xpython/examples/api/drain2
-rwxr-xr-xpython/examples/api/server2
-rwxr-xr-xpython/examples/api/spout2
3 files changed, 3 insertions, 3 deletions
diff --git a/python/examples/api/drain b/python/examples/api/drain
index c244cbc09c..d7ac03afa6 100755
--- a/python/examples/api/drain
+++ b/python/examples/api/drain
@@ -73,7 +73,7 @@ class Formatter:
return eval(st, self.environ)
# XXX: should make URL default the port for us
-conn = Connection(url.host, url.port or AMQP_PORT,
+conn = Connection(url.host, url.port,
username=url.user,
password=url.password,
reconnect=opts.reconnect,
diff --git a/python/examples/api/server b/python/examples/api/server
index d7cd53de4b..f0bf1c2a4b 100755
--- a/python/examples/api/server
+++ b/python/examples/api/server
@@ -51,7 +51,7 @@ else:
parser.error("address is required")
# XXX: should make URL default the port for us
-conn = Connection(url.host, url.port or AMQP_PORT,
+conn = Connection(url.host, url.port,
username=url.user,
password=url.password,
reconnect=opts.reconnect,
diff --git a/python/examples/api/spout b/python/examples/api/spout
index 9606c3501f..0d37ede512 100755
--- a/python/examples/api/spout
+++ b/python/examples/api/spout
@@ -93,7 +93,7 @@ else:
content = text
# XXX: should make URL default the port for us
-conn = Connection(url.host, url.port or AMQP_PORT,
+conn = Connection(url.host, url.port,
username=url.user,
password=url.password,
reconnect=opts.reconnect,