def save(self, file):
tree = {
"artifact" : self.__artifact.dump(),
"references" : [ a.dump() for a in self.__references.values() ]
}
try:
with gzip.open(file, 'wb', 6) as gzf:
json.dump(tree, io.TextIOWrapper(gzf, encoding='utf8'))
except OSError as e:
raise BuildError("Cannot write audit: " + str(e))
评论列表
文章目录