Example #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?')
Example #2
0
File: query.py Project: 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()
Example #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()
Example #4
0
File: query.py Project: 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()
Example #5
0
 def __init__(self, cachedir=None, piddir=None, pidfilename=None):
     EnvLoader.__init__(self,
                        cachedir=cachedir,
                        piddir=piddir,
                        pidfilename=pidfilename)
Example #6
0
 def __init__(self, cachedir=None, piddir=None, pidfilename=None):
     EnvLoader.__init__(self, cachedir=cachedir, piddir=piddir, pidfilename=pidfilename)