diff --git a/common/command.py b/common/command.py index a045a6ae..2af96419 100644 --- a/common/command.py +++ b/common/command.py @@ -99,7 +99,7 @@ def upload_file(ssh_client, local_path, remote_path, stdio=None): """ stdio.verbose("Please wait a moment, upload file to server {0}, local file path {1}, remote file path {2}".format(ssh_client.get_name(), local_path, remote_path)) try: - ssh_client.upload(local_path, remote_path) + ssh_client.upload(remote_path, local_path) except Exception as e: stdio.error("Upload File Failed error: {0}".format(e)) diff --git a/handler/analyzer/analyze_flt_trace.py b/handler/analyzer/analyze_flt_trace.py index 8624baaf..cac530a1 100644 --- a/handler/analyzer/analyze_flt_trace.py +++ b/handler/analyzer/analyze_flt_trace.py @@ -202,8 +202,6 @@ def __get_offline_log_file(self, ssh_client, log_path, local_store_dir): if self.flt_trace_id is not None and (len(log_name_list) > 0): grep_cmd = "grep -e '{grep_args}' {log_file} > {local_store_path} ".format(grep_args=self.flt_trace_id, log_file=' '.join(log_name_list), local_store_path=local_store_path) LocalClient(self.stdio).run(grep_cmd) - log_full_path = "{gather_path}/{log_name}".format(gather_path=log_path, log_name=self.flt_trace_id) - download_file(ssh_client, log_full_path, local_store_path, self.stdio) def __get_log_name_list_offline(self): """ diff --git a/handler/gather/gather_obstack2.py b/handler/gather/gather_obstack2.py index 2ca09f70..9b0e8084 100644 --- a/handler/gather/gather_obstack2.py +++ b/handler/gather/gather_obstack2.py @@ -201,7 +201,7 @@ def __chmod_obstack2(self, ssh_client): def __is_obstack_exists(self, ssh_client): cmd = "test -e {file} && echo exists".format(file=const.OBSTACK2_DEFAULT_INSTALL_PATH) - stdout = ssh_client.exec_cmd(cmd)[0] + stdout = ssh_client.exec_cmd(cmd) if stdout == 'exists': return False else: