Correctly obtains the python executable to use

Previously the sshuttle shell script would pass the python to use as the
first argument of the command. The new run script no longer does this.
Instead we can obtain the python being used via sys.executable.
Fixes #88.
This commit is contained in:
vieira 2016-04-20 00:38:55 +00:00 committed by Brian May
parent 89c5b57019
commit 516ff7bc4a

View File

@ -105,7 +105,7 @@ def connect(ssh_cmd, rhostport, python, stderr, options):
if not rhost:
# ignore the --python argument when running locally; we already know
# which python version works.
argv = [sys.argv[1], '-c', pyscript]
argv = [sys.executable, '-c', pyscript]
else:
if ssh_cmd:
sshl = ssh_cmd.split(' ')