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/examples/direct | |
| 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/examples/direct')
| -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 |
4 files changed, 4 insertions, 28 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())) |
