Commit 4a430185 authored by Anton Pershin's avatar Anton Pershin

Обновил импорт comaux

parent 38c24765
...@@ -8,7 +8,7 @@ import json ...@@ -8,7 +8,7 @@ import json
from stat import S_ISDIR from stat import S_ISDIR
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from comsdk.comaux import load_function_from_module import comsdk.comaux as aux
class Host(object): class Host(object):
''' '''
...@@ -37,8 +37,8 @@ class RemoteHost(Host): ...@@ -37,8 +37,8 @@ class RemoteHost(Host):
self.ssh_host = ssh_host self.ssh_host = ssh_host
self.cores = cores self.cores = cores
self.sge_template_name = sge_template_name self.sge_template_name = sge_template_name
self.set_job_id = load_function_from_module(job_setter) self.set_job_id = aux.load_function_from_module(job_setter)
self.check_task_finished = load_function_from_module(job_finished_checker) self.check_task_finished = aux.load_function_from_module(job_finished_checker)
self._job_setter = job_setter self._job_setter = job_setter
self._job_finished_checker = job_finished_checker self._job_finished_checker = job_finished_checker
super().__init__() super().__init__()
...@@ -58,8 +58,8 @@ class RemoteHost(Host): ...@@ -58,8 +58,8 @@ class RemoteHost(Host):
self.cores = state['cores'] self.cores = state['cores']
self.programs = state['programs'] self.programs = state['programs']
self.sge_template_name = state['sge_template_name'] self.sge_template_name = state['sge_template_name']
self.set_job_id = load_function_from_module(state['job_setter']) self.set_job_id = aux.load_function_from_module(state['job_setter'])
self.check_task_finished = load_function_from_module(state['job_finished_checker']) self.check_task_finished = aux.load_function_from_module(state['job_finished_checker'])
# Decorator # Decorator
def enable_sftp(func): def enable_sftp(func):
...@@ -157,7 +157,7 @@ class LocalCommunication(BaseCommunication): ...@@ -157,7 +157,7 @@ class LocalCommunication(BaseCommunication):
return cp(from_, to_) return cp(from_, to_)
def rm(self, target): def rm(self, target):
rm(target) aux.rm(target)
class SshCommunication(BaseCommunication): class SshCommunication(BaseCommunication):
def __init__(self, remote_host, username, password, machine_name=''): def __init__(self, remote_host, username, password, machine_name=''):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment