Skip to content

Commit fa579cc

Browse files
author
Pan
committed
Fixed forward agent flag not applying from native parallel client, added test for it.
Updated changelog.
1 parent 4d1f326 commit fa579cc

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- PYENV: 3.6.4
5353
before_install:
5454
- brew update
55-
- brew outdated openssl || brew upgrade openssl
55+
- brew outdated openssl || brew upgrade openssl || echo "y"
5656
- brew link --overwrite python@2 || brew install python@2 || brew link --overwrite python@2
5757
- which python2
5858
- python2 -c "from __future__ import print_function; import ssl; from platform import python_version; print(ssl.OPENSSL_VERSION); print(python_version())"

Changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Change Log
22
============
33

4+
1.8.2
5+
++++++
6+
7+
Fixes
8+
------
9+
10+
* Native parallel client ``forward_ssh_agent`` flag would not be applied correctly.
11+
412
1.8.1
513
++++++
614

pssh/clients/native/parallel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ def _make_ssh_client(self, host):
379379
pkey=_pkey, num_retries=self.num_retries,
380380
timeout=self.timeout,
381381
allow_agent=self.allow_agent, retry_delay=self.retry_delay,
382-
proxy_host=proxy_host, _auth_thread_pool=auth_thread_pool)
382+
proxy_host=proxy_host, _auth_thread_pool=auth_thread_pool,
383+
forward_ssh_agent=self.forward_ssh_agent)
383384

384385
def copy_file(self, local_file, remote_file, recurse=False, copy_args=None):
385386
"""Copy local file to remote file in parallel

tests/test_native_parallel_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,3 +1393,11 @@ def test_scp_recv(self):
13931393
def test_bad_hosts_value(self):
13941394
self.assertRaises(TypeError, ParallelSSHClient, 'a host')
13951395
self.assertRaises(TypeError, ParallelSSHClient, b'a host')
1396+
1397+
def test_disable_agent_forward(self):
1398+
client = ParallelSSHClient(
1399+
[self.host], port=self.port, pkey=self.user_key,
1400+
forward_ssh_agent=False,
1401+
num_retries=1)
1402+
client.join(client.run_command(self.cmd))
1403+
self.assertFalse(client.host_clients[self.host].forward_ssh_agent)

0 commit comments

Comments
 (0)