testing.find_python() uses an invalid environment variable name

Bug #439387 reported by Kai Lautaportti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

The find_python() function in testing.py does a

  os.environ.get('PYTHON%s' % version)

call where the ``version`` variable is something like 2.4, resulting in an environment variable such as "PYTHON2.4" being looked up. At least in some versions of Bash the dot/period is not a valid character which makes using an environment variable impossible.

The attached patch simple does a

   version.replace('.', '_')

in the appropriate place to overcome this.

Revision history for this message
Kai Lautaportti (kai-lautaportti) wrote :
Revision history for this message
Kai Lautaportti (kai-lautaportti) wrote :

I modified the patch slightly to do a

   version.replace('.', '')

instead so the required environment variables read a bit better, e.g. PYTHON25 instead of PYTHON2_5

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.