config_validation.py 文件源码

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

项目:scarlett_os 作者: bossjones 项目源码 文件源码
def match_all(value):
    """Validator that matches all values."""
    return value


# def platform_validator(domain):
#     """Validate if platform exists for given domain."""
#     def validator(value):
#         """Test if platform exists."""
#         if value is None:
#             raise vol.Invalid('platform cannot be None')
#         if get_platform(domain, str(value)):
#             return value
#         raise vol.Invalid(
#             'platform {} does not exist for {}'.format(value, domain))
#     return validator
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号