Skip to content

Commit

Permalink
Merge 8eba4d6 into 1279a5d
Browse files Browse the repository at this point in the history
  • Loading branch information
Leimeroth committed Jul 22, 2022
2 parents 1279a5d + 8eba4d6 commit 91c8517
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysqa/utils/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_queue_status(self, user=None):
else:
return df[df["user"] == user]

def get_job_from_remote(self, working_directory, delete_remote=False):
def get_job_from_remote(self, working_directory):
"""
Get the results of the calculation - this is necessary when the calculation was executed on a remote host.
"""
Expand All @@ -125,10 +125,10 @@ def get_job_from_remote(self, working_directory, delete_remote=False):
)
file_dict[local_file] = f
self._transfer_files(file_dict=file_dict, sftp=None, transfer_back=True)
if delete_remote:
if self._ssh_delete_file_on_remote:
self._execute_remote_command(command="rm -r " + remote_working_directory)

def transfer_file(self, file, transfer_back=False, delete_remote=False):
def transfer_file(self, file, transfer_back=False):
working_directory = os.path.abspath(os.path.expanduser(file))
remote_working_directory = self._get_remote_working_dir(
working_directory=working_directory
Expand All @@ -139,7 +139,7 @@ def transfer_file(self, file, transfer_back=False, delete_remote=False):
sftp=None,
transfer_back=transfer_back,
)
if delete_remote and transfer_back:
if self._ssh_delete_file_on_remote and transfer_back:
self._execute_remote_command(command="rm " + remote_working_directory)

def __del__(self):
Expand Down

0 comments on commit 91c8517

Please sign in to comment.