diff options
author | Alan Conway <aconway@apache.org> | 2008-05-15 21:34:10 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-05-15 21:34:10 +0000 |
commit | 66528d5ed7916352bd2ebbddd413874773020c6a (patch) | |
tree | 1e57b63a850b2320263da2843aeaa10ab1cf959e /python | |
parent | c8e16b308fe2243399c85fc4d8178eab5f421580 (diff) | |
download | qpid-python-66528d5ed7916352bd2ebbddd413874773020c6a.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/qpid@656853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rwxr-xr-x | python/examples/direct/declare_queues.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/direct_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/direct_producer.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/fanout_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/fanout_producer.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/pubsub/topic_publisher.py | 8 | ||||
-rwxr-xr-x | python/examples/pubsub/topic_subscriber.py | 8 | ||||
-rwxr-xr-x | python/examples/request-response/client.py | 8 | ||||
-rwxr-xr-x | python/examples/request-response/server.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/declare_queues.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/xml_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/xml_producer.py | 8 |
15 files changed, 15 insertions, 105 deletions
diff --git a/python/examples/direct/declare_queues.py b/python/examples/direct/declare_queues.py index deea0a3ccc..ce19a91a60 100755 --- a/python/examples/direct/declare_queues.py +++ b/python/examples/direct/declare_queues.py @@ -26,7 +26,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) @@ -39,14 +38,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/python/examples/direct/direct_consumer.py b/python/examples/direct/direct_consumer.py index f2018bbbb8..0e629b476a 100755 --- a/python/examples/direct/direct_consumer.py +++ b/python/examples/direct/direct_consumer.py @@ -24,7 +24,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) @@ -37,14 +36,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/python/examples/direct/direct_producer.py b/python/examples/direct/direct_producer.py index 8f6a91ba18..bdc668b3c4 100755 --- a/python/examples/direct/direct_producer.py +++ b/python/examples/direct/direct_producer.py @@ -24,7 +24,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) @@ -37,14 +36,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/python/examples/direct/listener.py b/python/examples/direct/listener.py index c18ef47fb7..ee13aae75b 100755 --- a/python/examples/direct/listener.py +++ b/python/examples/direct/listener.py @@ -45,7 +45,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) @@ -58,14 +57,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/python/examples/fanout/fanout_consumer.py b/python/examples/fanout/fanout_consumer.py index 21fc5e8f16..15452390a0 100755 --- a/python/examples/fanout/fanout_consumer.py +++ b/python/examples/fanout/fanout_consumer.py @@ -22,7 +22,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) @@ -35,14 +34,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/python/examples/fanout/fanout_producer.py b/python/examples/fanout/fanout_producer.py index 43d6a94c3d..f5b589c861 100755 --- a/python/examples/fanout/fanout_producer.py +++ b/python/examples/fanout/fanout_producer.py @@ -21,7 +21,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) @@ -34,14 +33,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/python/examples/fanout/listener.py b/python/examples/fanout/listener.py index 50cd06d2a5..56acd50e10 100755 --- a/python/examples/fanout/listener.py +++ b/python/examples/fanout/listener.py @@ -42,7 +42,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) @@ -55,14 +54,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/python/examples/pubsub/topic_publisher.py b/python/examples/pubsub/topic_publisher.py index 64e5a99924..fb817c15f4 100755 --- a/python/examples/pubsub/topic_publisher.py +++ b/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/python/examples/pubsub/topic_subscriber.py b/python/examples/pubsub/topic_subscriber.py index 3c4a8d8d0c..a4210c83ef 100755 --- a/python/examples/pubsub/topic_subscriber.py +++ b/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())) diff --git a/python/examples/request-response/client.py b/python/examples/request-response/client.py index 8ab1149901..7bb4ee3462 100755 --- a/python/examples/request-response/client.py +++ b/python/examples/request-response/client.py @@ -45,7 +45,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) @@ -58,14 +57,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/python/examples/request-response/server.py b/python/examples/request-response/server.py index 7b182723b9..dbe4b88208 100755 --- a/python/examples/request-response/server.py +++ b/python/examples/request-response/server.py @@ -37,7 +37,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) @@ -50,13 +49,8 @@ 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" - 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/python/examples/xml-exchange/declare_queues.py b/python/examples/xml-exchange/declare_queues.py index d3bf4d359e..8985c20cab 100755 --- a/python/examples/xml-exchange/declare_queues.py +++ b/python/examples/xml-exchange/declare_queues.py @@ -25,7 +25,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) @@ -38,14 +37,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/python/examples/xml-exchange/listener.py b/python/examples/xml-exchange/listener.py index cdc00a7015..f2f9105091 100755 --- a/python/examples/xml-exchange/listener.py +++ b/python/examples/xml-exchange/listener.py @@ -42,7 +42,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) @@ -55,14 +54,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/python/examples/xml-exchange/xml_consumer.py b/python/examples/xml-exchange/xml_consumer.py index c210a4342c..047faec668 100755 --- a/python/examples/xml-exchange/xml_consumer.py +++ b/python/examples/xml-exchange/xml_consumer.py @@ -24,7 +24,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) @@ -37,14 +36,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/python/examples/xml-exchange/xml_producer.py b/python/examples/xml-exchange/xml_producer.py index 9e609ed132..435045b0fa 100755 --- a/python/examples/xml-exchange/xml_producer.py +++ b/python/examples/xml-exchange/xml_producer.py @@ -42,7 +42,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) @@ -55,14 +54,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())) |