def __check_valid_key__(self, key):
file = h5py.File(self.file_name)
all_fields = []
file.visit(all_fields.append)
if not key in all_fields:
print_and_log(['The key %s can not be found in the dataset! Keys found are:' %key,
", ".join(all_fields)], 'error', logger)
sys.exit(1)
file.close()
评论列表
文章目录