From ca3bc30a4ff5fbd2504b2868eea60e647b16b2d8 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 15 May 2008 21:34:10 +0000 Subject: - 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 --- qpid/python/examples/pubsub/topic_publisher.py | 8 +------- qpid/python/examples/pubsub/topic_subscriber.py | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'qpid/python/examples/pubsub') 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())) -- cgit v1.2.1