Skip to content

Commit

Permalink
fix gather all (#344)
Browse files Browse the repository at this point in the history
* fix gather_obproxy_log.py

* fix sshclient upload

* build test package

* delete test package
  • Loading branch information
wayyoungboy authored Jul 17, 2024
1 parent b54e3a3 commit 2b23609
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/ssh_client/local_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion common/ssh_client/remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2b23609

Please sign in to comment.