Incorrect extension of PYTHONPATH

Bug #848493 reported by Tristan Seligmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Divmod Axiom
New
Undecided
Unassigned
Epsilon
Fix Released
Undecided
Unassigned
epsilon (Debian)
Fix Released
Unknown
python-axiom (Debian)
Fix Released
Unknown

Bug Description

If the PYTHONPATH environment variable is already empty, doing something like:

PYTHONPATH="/path/to/dir:$PYTHONPATH" python [...]

results in a PYTHONPATH of "/path/to/dir:". As the empty segment at the end is interpreted as . (the current directory), this is undesireable. The easiest way to avoid this is to do:

PYTHONPATH="/path/to/dir${PYTHONPATH:+:$PYTHONPATH}" python [...]

This defect is present in axiom.test.test_xatop in Axiom, as well as in epsilon.release in Epsilon.

Related branches

Changed in python-axiom (Debian):
status: Unknown → Confirmed
Changed in epsilon (Debian):
status: Unknown → Confirmed
Changed in epsilon (Debian):
status: Confirmed → Fix Released
Changed in epsilon:
status: New → Fix Released
Changed in python-axiom (Debian):
status: Confirmed → Fix Released
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.