1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-09-23 04:11:54 +01:00

connection: Add ParamikoBackgroundCommand.cmd attr for diagnostic

Add a "cmd" attribute for better exception messages.
This commit is contained in:
Douglas Raillard
2021-08-18 14:09:38 +01:00
committed by Marc Bonnici
parent e231cb0849
commit ad5a97afcc
2 changed files with 4 additions and 1 deletions

View File

@@ -591,6 +591,7 @@ class SshConnection(SshConnectionBase):
return bg_cmd
def _background(self, command, stdout, stderr, as_root):
orig_command = command
stdout, stderr, command = redirect_streams(stdout, stderr, command)
command = "printf '%s\n' $$; exec sh -c {}".format(quote(command))
@@ -708,6 +709,7 @@ class SshConnection(SshConnectionBase):
stdout=out_streams['stdout'][0],
stderr=out_streams['stderr'][0],
redirect_thread=redirect_thread,
cmd=orig_command,
)
def _close(self):