util.py 文件源码

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

项目:picoCTF 作者: picoCTF 项目源码 文件源码
def get_bundle(bundle_path):
    """
    Retrieve a bundle spec from a given bundle directory.

    Args:
        bundle_path: path to the root of the bundle directory.

    Returns:
        A bundle object.
    """

    json_path = join(bundle_path, "bundle.json")

    bundle = json.loads(open(json_path, "r").read())

    try:
        bundle_schema(bundle)
    except MultipleInvalid as e:
        logger.critical("Error validating bundle object at '%s'!", json_path)
        logger.critical(e)
        raise FatalException

    return bundle
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号