summaryrefslogtreecommitdiff
path: root/qpid/python/examples/pubsub
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-05-15 21:34:10 +0000
committerAlan Conway <aconway@apache.org>2008-05-15 21:34:10 +0000
commitca3bc30a4ff5fbd2504b2868eea60e647b16b2d8 (patch)
tree0e842261b0acd9b67ea4e3cb478e60bf975314b0 /qpid/python/examples/pubsub
parent91d75bcf41126fa56a782e4672c9ac5752ec2ded (diff)
downloadqpid-python-ca3bc30a4ff5fbd2504b2868eea60e647b16b2d8.tar.gz
- Enable python tets and examples in make rpmbuild.
- Remove hard-coded amqp.xml paths from python examples. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@656853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/examples/pubsub')
-rwxr-xr-xqpid/python/examples/pubsub/topic_publisher.py8
-rwxr-xr-xqpid/python/examples/pubsub/topic_subscriber.py8
2 files changed, 2 insertions, 14 deletions
diff --git a/qpid/python/examples/pubsub/topic_publisher.py b/qpid/python/examples/pubsub/topic_publisher.py
index 64e5a99924..fb817c15f4 100755
--- a/qpid/python/examples/pubsub/topic_publisher.py
+++ b/qpid/python/examples/pubsub/topic_publisher.py
@@ -30,7 +30,6 @@ host="127.0.0.1"
port=5672
user="guest"
password="guest"
-amqp_spec="/usr/share/amqp/amqp.0-10.xml"
# If an alternate host or port has been specified, use that instead
# (this is used in our unit tests)
@@ -43,14 +42,9 @@ if len(sys.argv) > 1 :
if len(sys.argv) > 2 :
port=int(sys.argv[2])
-try:
- amqp_spec = os.environ["AMQP_SPEC"]
-except KeyError:
- amqp_spec="/usr/share/amqp/amqp.0-10.xml"
-
# Create a connection.
socket = connect(host, port)
-connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec))
+connection = Connection (sock=socket)
connection.start()
session = connection.session(str(uuid4()))
diff --git a/qpid/python/examples/pubsub/topic_subscriber.py b/qpid/python/examples/pubsub/topic_subscriber.py
index 3c4a8d8d0c..a4210c83ef 100755
--- a/qpid/python/examples/pubsub/topic_subscriber.py
+++ b/qpid/python/examples/pubsub/topic_subscriber.py
@@ -54,7 +54,6 @@ host="127.0.0.1"
port=5672
user="guest"
password="guest"
-amqp_spec="/usr/share/amqp/amqp.0-10.xml"
# If an alternate host or port has been specified, use that instead
# (this is used in our unit tests)
@@ -67,14 +66,9 @@ if len(sys.argv) > 1 :
if len(sys.argv) > 2 :
port=int(sys.argv[2])
-try:
- amqp_spec = os.environ["AMQP_SPEC"]
-except KeyError:
- amqp_spec="/usr/share/amqp/amqp.0-10.xml"
-
# Create a connection.
socket = connect(host, port)
-connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec))
+connection = Connection (sock=socket)
connection.start()
session = connection.session(str(uuid4()))