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/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: