def init(): global _POLICY_PATH global _POLICY_CACHE if not _POLICY_PATH: _POLICY_PATH = utils.find_config(CONF.policy_file) utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_brain)
def init(): global _POLICY_PATH global _POLICY_CACHE if not _POLICY_PATH: _POLICY_PATH = CONF.policy_file if not os.path.exists(_POLICY_PATH): _POLICY_PATH = CONF.find_file(_POLICY_PATH) utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_rules)
def init(): global _POLICY_PATH global _POLICY_CACHE if not _POLICY_PATH: _POLICY_PATH = CONF.policy_file if not os.path.exists(_POLICY_PATH): _POLICY_PATH = CONF.find_file(_POLICY_PATH) utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_brain)
def init(): global _POLICY_PATH global _POLICY_CACHE global _ENFORCER if not _POLICY_PATH: _POLICY_PATH = CONF.policy_file if not os.path.exists(_POLICY_PATH): _POLICY_PATH = CONF.find_file(_POLICY_PATH) if not _ENFORCER: _ENFORCER = common_policy.Enforcer(policy_file=_POLICY_PATH) utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE, reload_func=_set_rules)