diff --git a/common/ssh_client/local_client.py b/common/ssh_client/local_client.py index 52ee2ca9..b7d849d6 100644 --- a/common/ssh_client/local_client.py +++ b/common/ssh_client/local_client.py @@ -48,7 +48,7 @@ def upload(self, remote_path, local_path): try: shutil.copy(local_path, remote_path) except Exception as e: - self.stdio.error("upload file to localhost, remote _path =[{0}], local _path=[{1}], error=[{2}]".format(remote_path, local_path, str(e))) + self.stdio.error("upload file to localhost, remote_path =[{0}], local_path=[{1}], error=[{2}]".format(remote_path, local_path, str(e))) raise Exception("[local] upload file to localhost, remote _path =[{0}], local _path=[{1}], error=[{2}]".format(remote_path, local_path, str(e))) def ssh_invoke_shell_switch_user(self, new_user, cmd, time_out): diff --git a/common/ssh_client/remote_client.py b/common/ssh_client/remote_client.py index 6bcfdaf6..b128be0e 100644 --- a/common/ssh_client/remote_client.py +++ b/common/ssh_client/remote_client.py @@ -105,7 +105,7 @@ def progress_bar(self, transferred, to_be_transferred, suffix=''): def upload(self, remote_path, local_path): transport = self._ssh_fd.get_transport() self._sftp_client = paramiko.SFTPClient.from_transport(transport) - self._sftp_client.put(remote_path, local_path) + self._sftp_client.put(local_path, remote_path) self._sftp_client.close() def ssh_invoke_shell_switch_user(self, new_user, cmd, time_out):