From e6074ed52d5c26f3cf53ffd04219f9fec32d2aed Mon Sep 17 00:00:00 2001 From: Brian May Date: Tue, 20 Aug 2024 16:23:43 +1000 Subject: [PATCH] Revert "Suppress error P is not recognized as an internal or external command,operable program or batch file." This reverts commit 6272a0212ccb14b1b32d974e0008cd9e49d526de. --- sshuttle/ssh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py index d4451f5..8f295e2 100644 --- a/sshuttle/ssh.py +++ b/sshuttle/ssh.py @@ -115,8 +115,8 @@ def connect(ssh_cmd, rhostport, python, stderr, add_cmd_delimiter, remote_shell, pyscript = r""" import sys, os; verbosity=%d; - stdin = os.fdopen(0, "rb"); - exec(compile(stdin.read(%d), "assembler.py", "exec")); + stdin = os.fdopen(0, 'rb'); + exec(compile(stdin.read(%d), 'assembler.py', 'exec')); sys.exit(98); """ % (helpers.verbose or 0, len(content)) pyscript = re.sub(r'\s+', ' ', pyscript.strip()) @@ -142,7 +142,7 @@ def connect(ssh_cmd, rhostport, python, stderr, add_cmd_delimiter, remote_shell, pycmd = '%s -c %s' % (python or 'python', pyscript) else: # posix shell expected if python: - pycmd = "%s -c \"%s\"" % (python, pyscript) + pycmd = '"%s" -c "%s"' % (python, pyscript) else: # By default, we run the following code in a shell. # However, with restricted shells and other unusual