wsgi.py 文件源码

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

项目:vdi-broker 作者: cloudbase 项目源码 文件源码
def validate_name_and_description(body):
        name = body.get('name')
        if name is not None:
            if isinstance(name, six.string_types):
                body['name'] = name.strip()
            try:
                _check_string_length(body['name'], 'Name',
                                     min_length=0, max_length=255)
            except exception.InvalidInput as error:
                raise webob.exc.HTTPBadRequest(explanation=error.msg)

        description = body.get('description')
        if description is not None:
            try:
                _check_string_length(description, 'Description',
                                     min_length=0, max_length=255)
            except exception.InvalidInput as error:
                raise webob.exc.HTTPBadRequest(explanation=error.msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号