Skip to content

Commit

Permalink
Merge pull request #30 from pyiron/ssh_delete_file_on_remote_fixes
Browse files Browse the repository at this point in the history
Fix ssh_delete_file_on_remote
  • Loading branch information
jan-janssen authored Aug 16, 2020
2 parents 7502e9e + 1d91ecd commit 42fdb0d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions pysqa/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def __init__(self, config, directory="~/.queues"):
self._commands = getattr(importlib.import_module(module_name), class_name)()
self._queues = Queues(self.queue_list)
self._remote_flag = False
self._ssh_delete_file_on_remote = True

@property
def ssh_delete_file_on_remote(self):
return self._ssh_delete_file_on_remote

@property
def remote_flag(self):
Expand Down
4 changes: 4 additions & 0 deletions pysqa/queueadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def config(self):
"""
return self._adapter.config

@property
def ssh_delete_file_on_remote(self):
return self._adapter.ssh_delete_file_on_remote

@property
def remote_flag(self):
"""
Expand Down
9 changes: 4 additions & 5 deletions pysqa/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ def __init__(self, config, directory="~/.queues"):
self._ssh_remote_config_dir = config['ssh_remote_config_dir']
self._ssh_remote_path = config['ssh_remote_path']
self._ssh_local_path = os.path.abspath(os.path.expanduser(config['ssh_local_path']))
self._ssh_delete_file_on_remote = config['ssh_delete_file_on_remote']
if 'ssh_delete_file_on_remote' in config.keys():
self._ssh_delete_file_on_remote = config['ssh_delete_file_on_remote']
else:
self._ssh_delete_file_on_remote = True
if 'ssh_port' in config.keys():
self._ssh_port = config['ssh_port']
else:
Expand All @@ -31,10 +34,6 @@ def __init__(self, config, directory="~/.queues"):
else:
self._ssh_connection = None
self._remote_flag = True

@property
def ssh_delete_file_on_remote(self):
return self._ssh_delete_file_on_remote

def convert_path_to_remote(self, path):
working_directory = os.path.abspath(os.path.expanduser(path))
Expand Down

0 comments on commit 42fdb0d

Please sign in to comment.