def execute(self, args, p, preargs=''):
if runtime.platformType == 'win32':
raise unittest.SkipTest, "can't run cmdline client on win32"
port = self.server.getHost().port
cmd = ('-p %i -l testuser '
'--known-hosts kh_test '
'--user-authentications publickey '
'--host-key-algorithms ssh-rsa '
'-a -I '
'-K direct '
'-i dsa_test '
'-v ') % port + preargs + \
' 127.0.0.1 ' + args
cmds = _makeArgs(cmd.split())
log.msg(str(cmds))
env = os.environ.copy()
env['PYTHONPATH'] = os.pathsep.join(sys.path)
reactor.spawnProcess(p, sys.executable, cmds, env=env)
return p.deferred
评论列表
文章目录