diff --git a/pysqa/basic.py b/pysqa/basic.py index ca9f93c9..dc896135 100644 --- a/pysqa/basic.py +++ b/pysqa/basic.py @@ -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): diff --git a/pysqa/queueadapter.py b/pysqa/queueadapter.py index 9cc78f4c..e17f9fc5 100644 --- a/pysqa/queueadapter.py +++ b/pysqa/queueadapter.py @@ -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): """ diff --git a/pysqa/remote.py b/pysqa/remote.py index 8e885e4b..f7f15214 100644 --- a/pysqa/remote.py +++ b/pysqa/remote.py @@ -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: @@ -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))