예제 #1
0
    def __init__(self, cachedir=None, piddir=None, pidfilename=None):
        EnvLoader.__init__(self,
                           cachedir=cachedir,
                           piddir=piddir,
                           pidfilename=pidfilename)

        # TODO: This is nasty. Need to do something with this better. ASAP!
        try:
            self.db.open()
        except Exception as ex:
            log.error('Unable to [re]open db. Already opened?')
예제 #2
0
파일: query.py 프로젝트: zer0n1/salt
    def __init__(self, scope, cachedir=None):
        '''
        Constructor.

        :param scope:
        :return:
        '''
        if scope not in self.SCOPES:
            raise InspectorQueryException(
                "Unknown scope: {0}. Must be one of: {1}".format(repr(scope), ", ".join(self.SCOPES)))
        EnvLoader.__init__(self, cachedir=cachedir)
        self.scope = '_' + scope
        self.local_identity = dict()
예제 #3
0
    def __init__(self, scope, cachedir=None):
        """
        Constructor.

        :param scope:
        :return:
        """
        if scope and scope not in self.SCOPES:
            raise InspectorQueryException(
                "Unknown scope: {}. Must be one of: {}".format(
                    repr(scope), ", ".join(self.SCOPES)))
        elif not scope:
            raise InspectorQueryException(
                "Scope cannot be empty. Must be one of: {}".format(", ".join(
                    self.SCOPES)))
        EnvLoader.__init__(self, cachedir=cachedir)
        self.scope = "_" + scope
        self.local_identity = dict()
예제 #4
0
파일: query.py 프로젝트: bryson/salt
    def __init__(self, scope, cachedir=None):
        '''
        Constructor.

        :param scope:
        :return:
        '''
        if scope and scope not in self.SCOPES:
            raise InspectorQueryException(
                "Unknown scope: {0}. Must be one of: {1}".format(repr(scope), ", ".join(self.SCOPES))
            )
        elif not scope:
            raise InspectorQueryException(
                "Scope cannot be empty. Must be one of: {0}".format(", ".join(self.SCOPES))
            )
        EnvLoader.__init__(self, cachedir=cachedir)
        self.scope = '_' + scope
        self.local_identity = dict()
예제 #5
0
파일: collector.py 프로젝트: cldeluna/salt
 def __init__(self, cachedir=None, piddir=None, pidfilename=None):
     EnvLoader.__init__(self,
                        cachedir=cachedir,
                        piddir=piddir,
                        pidfilename=pidfilename)
예제 #6
0
파일: collector.py 프로젝트: bryson/salt
 def __init__(self, cachedir=None, piddir=None, pidfilename=None):
     EnvLoader.__init__(self, cachedir=cachedir, piddir=piddir, pidfilename=pidfilename)