diff --git a/broker/binds/hussh.py b/broker/binds/hussh.py index f983b35..9b86921 100644 --- a/broker/binds/hussh.py +++ b/broker/binds/hussh.py @@ -91,9 +91,7 @@ def remote_copy(self, source, dest_host, dest_path=None, ensure_dir=True): def run(self, command, timeout=0): """Run a command on the host and return the results.""" - # TODO support timeout parameter - result = self.session.execute(command) - + result = self.session.execute(command, timeout=helpers.translate_timeout(timeout)) # Create broker Result from hussh SSHResult return helpers.Result( status=result.status, diff --git a/pyproject.toml b/pyproject.toml index cb39399..645f5fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ ssh2_py311 = ["ssh2-python"] ssh2_python = ["ssh2-python"] ssh2_python312 = ["ssh2-python312"] ansible_pylibssh = ["ansible-pylibssh"] -hussh = ["hussh"] +hussh = ["hussh>=0.1.7"] [project.scripts] broker = "broker.commands:cli"