Bug 430114 - AMQP XML path hard coded in python examples.
AMQP XML path hard coded in python examples.
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Rafael H. Schloming
Kim van der Riet
Depends On:
  Show dependency treegraph
Reported: 2008-01-24 11:38 EST by Alan Conway
Modified: 2014-12-01 18:14 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-08-21 12:53:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alan Conway 2008-01-24 11:38:28 EST
Description of problem:

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


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
 - 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 15:42:38 EST
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 11:32:32 EDT
rafaels@redhat.com made the required change to the python client, I removed the
redundant code from the demos.
Comment 4 Martin Kudlej 2009-04-22 04:51:43 EDT
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.