mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Use the code directory instead of cwd for python path
This commit is contained in:
parent
61889ba934
commit
e5972f5a03
@ -252,9 +252,9 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
||||
if 'env' not in popen_kwargs:
|
||||
popen_kwargs['env'] = os.environ.copy()
|
||||
if sys.version_info[0] < 3:
|
||||
popen_kwargs['env'][b'PYTHONPATH'] = os.getcwd().encode()
|
||||
popen_kwargs['env'][b'PYTHONPATH'] = CODE_DIR.encode()
|
||||
else:
|
||||
popen_kwargs['env']['PYTHONPATH'] = os.getcwd()
|
||||
popen_kwargs['env']['PYTHONPATH'] = CODE_DIR
|
||||
else:
|
||||
cmd = 'PYTHONPATH='
|
||||
python_path = os.environ.get('PYTHONPATH', None)
|
||||
|
Loading…
Reference in New Issue
Block a user