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
评论列表
文章目录