diff options
author | Chris Lumens <clumens@redhat.com> | 2008-01-22 13:31:53 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-01-22 13:32:41 -0500 |
commit | 5a2d474bfaccaa17b7f7a823a0846cefc389f360 (patch) | |
tree | eec7e1cf033beb75b026fe562c1cf158d2764648 /anaconda | |
parent | a6cee51834bf9ff6cb9b64c433b89ca3d87b4e52 (diff) | |
download | anaconda-5a2d474bfaccaa17b7f7a823a0846cefc389f360.tar.gz anaconda-5a2d474bfaccaa17b7f7a823a0846cefc389f360.tar.xz anaconda-5a2d474bfaccaa17b7f7a823a0846cefc389f360.zip |
Make sure anaconda has precedence in the module search path (#331091).
Based on a patch from Toshio Ernie Kuratomi <a DOT badger AT gmail DOT com>.
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -323,13 +323,24 @@ def setVNCFromKickstart(opts): def setupPythonPath(): # For anaconda in test mode if (os.path.exists('isys')): - sys.path.append('isys') - sys.path.append('textw') - sys.path.append('iw') + sys.path.insert(0, 'isys') + sys.path.insert(0, 'textw') + sys.path.insert(0, 'iw') else: - sys.path.append('/usr/lib/anaconda') - sys.path.append('/usr/lib/anaconda/textw') - sys.path.append('/usr/lib/anaconda/iw') + haveUpdates = False + for ndx in range(0, len(sys.path) - 1): + if sys.path[ndx].endswith('RHupdates'): + haveUpdates = True + break + + if haveUpdates: + sys.path.insert(ndx+1, '/usr/lib/anaconda') + sys.path.insert(ndx+2, '/usr/lib/anaconda/textw') + sys.path.insert(ndx+3, '/usr/lib/anaconda/iw') + else: + sys.path.insert(0, '/usr/lib/anaconda') + sys.path.insert(1, '/usr/lib/anaconda/textw') + sys.path.insert(2, '/usr/lib/anaconda/iw') if (os.path.exists('booty')): sys.path.append('booty') |