testing.find_python() uses an invalid environment variable name

Bug #439387 reported by Kai Lautaportti on 2009-09-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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.

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  Edit
Everyone can see this information.

Other bug subscribers