configuration.py 文件源码

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

项目:node-gn 作者: Shouqun 项目源码 文件源码
def _call_validator(opttype, optdict, option, value):
    if opttype not in VALIDATORS:
        raise Exception('Unsupported type "%s"' % opttype)
    try:
        return VALIDATORS[opttype](optdict, option, value)
    except TypeError:
        try:
            return VALIDATORS[opttype](value)
        except optik_ext.OptionValueError:
            raise
        except:
            raise optik_ext.OptionValueError('%s value (%r) should be of type %s' %
                                   (option, value, opttype))

# user input functions ########################################################

# user input functions will ask the user for input on stdin then validate
# the result and return the validated value or raise optparse.OptionValueError
# XXX add to documentation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号