def __init__(self, config): """A valid individual able to run tasks. Must be validated as a prerequisite Args: config: a self.config ConfigParser object. """ self.__config = config self.__subjectDir = self.__config.get('arguments', 'subjectDir') self.__name = os.path.basename(self.__subjectDir) self.__logDir = os.path.join(self.__subjectDir, self.__config.get('dir', 'log')) if not os.path.exists(self.__logDir): os.mkdir(self.__logDir) Lock.__init__(self, self.__logDir, self.__name)
def __init__(self, config): """A valid individual who have the capability to run tasks. This class have the responsability to write a document of the softwares and versions into the log directory Must be validated as a prerequisite Args: config: a self.config ConfigParser object. """ self.__config = config self.__subjectDir = self.__config.get('arguments', 'subjectDir') self.__name = os.path.basename(self.__subjectDir) self.__logDir = os.path.join(self.__subjectDir, self.__config.get('dir', 'log')) #the subject logger must be call without file information during initialization Logger.__init__(self) Lock.__init__(self, self.__logDir, self.__name) Validation.__init__(self, self.__subjectDir, self.__config)