Bug 430114 - AMQP XML path hard coded in python examples.
Summary: AMQP XML path hard coded in python examples.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: beta
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Rafael H. Schloming
QA Contact: Kim van der Riet
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-24 16:38 UTC by Alan Conway
Modified: 2014-12-01 23:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-21 16:53:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alan Conway 2008-01-24 16:38:28 UTC
Description of problem:


The python examples hard-code the spec location like this:

amqp_spec="/usr/share/amqp/amqp.0-10-preview.xml"

This is ugly. Customers should not even have to know of the existence of the XML
file, and hard coding it makes it impossible to run clients if qpid is installed
anywhere other than /usr/share/amqp (e.g. it could be in /usr/local/share)

I'd suggest that the spec file should not be specified at all in code, but
should be defaulted from
 - An environment variable (useful for us and others testing in a mulit-qpid
environment)
 - The python search path: our installer can substitute the actual installed
location in a small .py file that gets installed on the standard python path.
 - /usr/share/amqp if nothing else works.

Comment 1 Alan Conway 2008-02-12 20:42:38 UTC
This also prevents us correctly automating python example interop tests.
Currently they work only if amqp.xml is installed in the hard coded
/usr/share... location.

Comment 2 Alan Conway 2008-05-16 15:32:32 UTC
rafaels made the required change to the python client, I removed the
redundant code from the demos.

Comment 4 Martin Kudlej 2009-04-22 08:51:43 UTC
Tested on RHEL 5.3 i386/x86_64 python-qpid-0.5.752581-1.el5

I moved /usr/share/amqp/ to /root/amqp, I changed configuration of /usr/lib/python2.4/site-packages/qpid_config.py and /usr/lib/python2.4/site-packages/qpid/qpid_config.py and I removed *.pyo and *.pyc files. All rhm-docs tests worked fine with this changed configuration. -->VERIFIED


Note You need to log in before you can comment on or make changes to this bug.