Fix warts on linux py3

This commit is contained in:
Daniel A. Wozniak 2020-01-29 15:14:13 +00:00
parent 1eb3c6ed00
commit 82b939acdb
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -14,6 +14,7 @@ from tests.support.runtests import RUNTIME_VARS
import tests.support.helpers
# Import Salt libs
import salt.ext.six
import salt.modules.cmdmod
import salt.utils.platform
import salt.utils.files
@ -47,9 +48,12 @@ class VendorTornadoTest(TestCase):
# Preserve the virtual environment
env = os.environ.copy()
if salt.utils.platform.is_windows():
env[b'PYTHONPATH'] = b';'.join([a.encode() for a in sys.path])
if salt.ext.six.PY2:
env[b'PYTHONPATH'] = b';'.join([a.encode() for a in sys.path])
else:
env['PYTHONPATH'] = ';'.join(sys.path)
else:
env[b'PYTHONPATH'] = b':'.join([a.encode() for a in sys.path])
env['PYTHONPATH'] = ':'.join(sys.path)
p = subprocess.Popen(
[sys.executable, test_source_path],
stderr=subprocess.PIPE,