qolicy.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:ranger 作者: openstack 项目源码 文件源码
def _get_policy_path(self, path):
        """Locate the policy JSON data file/path.

        :param path: It's value can be a full path or related path. When
                     full path specified, this function just returns the full
                     path. When related path specified, this function will
                     search configuration directories to find one that exists.

        :returns: The policy path

        :raises: ConfigFilesNotFoundError if the file/path couldn't
                 be located.
        """
        policy_path = self.conf.find_file(path)

        if policy_path:
            return policy_path

        raise cfg.ConfigFilesNotFoundError((path,))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号