[py-svn] r11682 - py/dist/py/execnet
hpk at codespeak.net
hpk at codespeak.net
Sun May 1 09:50:55 CEST 2005
Author: hpk
Date: Sun May 1 09:50:55 2005
New Revision: 11682
Modified:
py/dist/py/execnet/register.py
Log:
change calling signature for SshGateway
in a pretty backward compatible way.
Modified: py/dist/py/execnet/register.py
==============================================================================
--- py/dist/py/execnet/register.py (original)
+++ py/dist/py/execnet/register.py Sun May 1 09:50:55 2005
@@ -137,17 +137,16 @@
remote_install = classmethod(remote_install)
class SshGateway(PopenCmdGateway):
- def __init__(self, host, port=None, username=None, remotepython='python'):
- if port is not None:
- host = '%s:%d' % (host, port)
+ def __init__(self, sshaddress, remotepython='python', identity=None):
remotecmd = '%s -u -c "exec input()"' % (remotepython,)
- cmdline = [host, remotecmd]
- if username is not None:
- cmdline[:0] = ['-l', username]
+ cmdline = [sshaddress, remotecmd]
# XXX Unix style quoting
for i in range(len(cmdline)):
cmdline[i] = "'" + cmdline[i].replace("'", "'\\''") + "'"
- cmdline.insert(0, 'ssh')
+ cmd = 'ssh'
+ if identity is not None:
+ cmd += ' -i %s' % (identity,)
+ cmdline.insert(0, cmd)
super(SshGateway, self).__init__(' '.join(cmdline))
class ExecGateway(PopenGateway):
More information about the pytest-commit
mailing list