コード例 #1
0
ファイル: subject.py プロジェクト: alexhng/toad
    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)
コード例 #2
0
ファイル: subject.py プロジェクト: alexhng/toad
    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)
コード例 #3
0
ファイル: subject.py プロジェクト: arnaudbore/toad
    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)
コード例 #4
0
    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)