speedtest.py 文件源码

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

项目:SmartSocks 作者: waylybaye 项目源码 文件源码
def validate_optional_args(args):
    """Check if an argument was provided that depends on a module that may
    not be part of the Python standard library.

    If such an argument is supplied, and the module does not exist, exit
    with an error stating which module is missing.
    """
    optional_args = {
        'json': ('json/simplejson python module', json),
        'secure': ('SSL support', HTTPSConnection),
    }

    for arg, info in optional_args.items():
        if getattr(args, arg, False) and info[1] is None:
            raise SystemExit('%s is not installed. --%s is '
                             'unavailable' % (info[0], arg))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号