validations.py 文件源码

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

项目:deckhand 作者: att-comdev 项目源码 文件源码
def _show_validation_entry(self, req, resp, revision_id, validation_name,
                               entry_id):
        try:
            entry_id = int(entry_id)
        except ValueError:
            raise falcon.HTTPBadRequest(
                description='The {entry_id} parameter must be an integer.')

        try:
            entry = db_api.validation_get_entry(
                revision_id, validation_name, entry_id)
        except (errors.RevisionNotFound, errors.ValidationNotFound) as e:
            raise falcon.HTTPNotFound(description=e.format_message())

        resp_body = self.view_builder.show_entry(entry)
        return resp_body
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号