New submission from ivank <[email protected]>:
I'm using MSYS's ssh.exe, installed to C:\msys\1.0\bin\ssh.exe. `twisted.python.procutils.which` finds one ssh.exe:
{{{
>>> from twisted.python.procutils import which
>>> which('ssh')
['C:\\msys\\1.0\\bin\\ssh.EXE']
}}}
So `OpenSSHClientTestCase` correctly thinks that the client is available (it does not skip).
{{{
if not which('ssh'):
skip = "no ssh command-line client available"
}}}
But when the tests actually run, they fail:
{{{
===============================================================================
[ERROR]: twisted.conch.test.test_conch.OpenSSHClientTestCase.test_exec
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 340, in test_exec
d = self.execute('echo goodbye', ConchTestOpenSSHProcess())
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 405, in execute
reactor.spawnProcess(process, "ssh", cmds)
File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 234, in spawnProcess
return Process(self, processProtocol, executable, args, env, path)
File "C:\Python26\lib\site-packages\twisted\internet\_dumbwin32proc.py", line 203, in __init__
raise OSError(pwte)
exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')
===============================================================================
[ERROR]: twisted.conch.test.test_conch.OpenSSHClientTestCase.test_localToRemoteForwarding
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 353, in test_localToRemoteForwarding
% (localPort, self.echoPort))
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 405, in execute
reactor.spawnProcess(process, "ssh", cmds)
File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 234, in spawnProcess
return Process(self, processProtocol, executable, args, env, path)
File "C:\Python26\lib\site-packages\twisted\internet\_dumbwin32proc.py", line 203, in __init__
raise OSError(pwte)
exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')
===============================================================================
[ERROR]: twisted.conch.test.test_conch.OpenSSHClientTestCase.test_remoteToLocalForwarding
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 367, in test_remoteToLocalForwarding
% (localPort, self.echoPort))
File "C:\Python26\lib\site-packages\twisted\conch\test\test_conch.py", line 405, in execute
reactor.spawnProcess(process, "ssh", cmds)
File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 234, in spawnProcess
return Process(self, processProtocol, executable, args, env, path)
File "C:\Python26\lib\site-packages\twisted\internet\_dumbwin32proc.py", line 203, in __init__
raise OSError(pwte)
exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')
-------------------------------------------------------------------------------
Ran 7 tests in 0.082s
}}}
I think the solution is to `spawnProcess` with the full path of the ssh executable, instead of with "ssh".
Tested with Server 2008 SP1, Python 2.6.2 32 bit, Twisted r27226.
----------
Type : defect
Component: conch
Keywords :
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/3966
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.