Ensure ports are set correctly in accelerate module
This commit is contained in:
parent
eae0cb5d81
commit
f6e1bdabea
1 changed files with 10 additions and 3 deletions
|
@ -49,6 +49,16 @@ class Connection(object):
|
||||||
self.accport = port[1]
|
self.accport = port[1]
|
||||||
self.is_connected = False
|
self.is_connected = False
|
||||||
|
|
||||||
|
if not self.port:
|
||||||
|
self.port = constants.DEFAULT_REMOTE_PORT
|
||||||
|
elif not isinstance(self.port, int):
|
||||||
|
self.port = int(self.port)
|
||||||
|
|
||||||
|
if not self.accport:
|
||||||
|
self.accport = constants.ACCELERATE_PORT
|
||||||
|
elif not isinstance(self.accport, int):
|
||||||
|
self.accport = int(self.accport)
|
||||||
|
|
||||||
self.ssh = SSHConnection(
|
self.ssh = SSHConnection(
|
||||||
runner=self.runner,
|
runner=self.runner,
|
||||||
host=self.host,
|
host=self.host,
|
||||||
|
@ -58,9 +68,6 @@ class Connection(object):
|
||||||
private_key_file=private_key_file
|
private_key_file=private_key_file
|
||||||
)
|
)
|
||||||
|
|
||||||
if not self.accport:
|
|
||||||
self.accport = constants.ACCELERATE_PORT
|
|
||||||
|
|
||||||
# attempt to work around shared-memory funness
|
# attempt to work around shared-memory funness
|
||||||
if getattr(self.runner, 'aes_keys', None):
|
if getattr(self.runner, 'aes_keys', None):
|
||||||
utils.AES_KEYS = self.runner.aes_keys
|
utils.AES_KEYS = self.runner.aes_keys
|
||||||
|
|
Loading…
Reference in a new issue