Fix windows handling of path loading

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
This commit is contained in:
Dan Ryan
2018-07-23 18:35:17 -04:00
parent 02fc52b8da
commit 04de369c6b
+4 -3
View File
@@ -945,11 +945,12 @@ def temp_path():
def load_path(python):
from ._compat import Path
import delegator
import json
python = escape_grouped_arguments(python)
json_dump_commmand = "'import json, sys; print(json.dumps(sys.path));'"
c = delegator.run("{0} -c {1}".format(python, json_dump_commmand))
python = Path(python).as_posix()
json_dump_commmand = '"import json, sys; print(json.dumps(sys.path));"'
c = delegator.run('"{0}" -c {1}'.format(python, json_dump_commmand))
if c.return_code == 0:
return json.loads(c.out.strip())
else: