diff options
Diffstat (limited to 'python/examples/pubsub')
-rwxr-xr-x | python/examples/pubsub/topic_publisher.py | 8 | ||||
-rwxr-xr-x | python/examples/pubsub/topic_subscriber.py | 8 |
2 files changed, 2 insertions, 14 deletions
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())) |