Skip to content

Commit a7f0320

Browse files
author
Dan
committed
Bug fix for cmd quoting. Bumped version
1 parent 72a61df commit a7f0320

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pssh/ssh_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
212212
self._read_output_buffer(_stderr,
213213
prefix='\t[err]')
214214
if sudo and not user:
215-
command = 'sudo -S bash -c \'%s\'' % command.replace('"', '\\"')
215+
command = 'sudo -S bash -c \'%s\'' % (command,)
216216
elif user:
217217
command = 'sudo -u %s -S bash -c \'%s\'' % (
218-
user, command.replace('"', '\\"'),)
218+
user, command,)
219219
else:
220-
command = 'bash -c \'%s\'' % command.replace('"', '\\"')
220+
command = 'bash -c \'%s\'' % (command,)
221221
logger.debug("Running command %s on %s", command, self.host)
222222
channel.exec_command(command, **kwargs)
223223
logger.debug("Command started")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from setuptools import setup, find_packages
1717

1818
setup(name='parallel-ssh',
19-
version='0.80.2',
19+
version='0.80.3',
2020
description='Asynchronous parallel SSH library',
2121
author='Panos Kittenis',
2222
author_email='[email protected]',

0 commit comments

Comments
 (0)