Skip to content

Commit

Permalink
Fix type of sshexecutor stdin variable
Browse files Browse the repository at this point in the history
  • Loading branch information
giffels committed Nov 9, 2023
1 parent 36ac7c1 commit 4687973
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. Created by changelog.py at 2023-10-10, command
.. Created by changelog.py at 2023-11-09, command
'/Users/giffler/.cache/pre-commit/repor6pnmwlm/py_env-python3.10/bin/changelog docs/source/changes compile --categories Added Changed Fixed Security Deprecated --output=docs/source/changelog.rst'
based on the format of 'https://keepachangelog.com/'
Expand Down
2 changes: 1 addition & 1 deletion tardis/utilities/executors/sshexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def run_command(self, command, stdin_input=None):
async with self.bounded_connection as ssh_connection:
try:
response = await ssh_connection.run(
command, check=True, input=stdin_input and stdin_input.encode()
command, check=True, input=stdin_input and stdin_input
)
except asyncssh.ProcessError as pe:
raise CommandExecutionFailure(
Expand Down
2 changes: 1 addition & 1 deletion tests/utilities_t/executors_t/test_sshexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def run(self, command, input=None, **kwargs):
elif command != "Test":
raise ValueError(f"Unsupported mock command: {command}")
return AttributeDict(
stdout=input and input.decode(), stderr="TestError", exit_status=0
stdout=input and input, stderr="TestError", exit_status=0
)

async def create_process(self):
Expand Down

0 comments on commit 4687973

Please sign in to comment.