low_level.py 文件源码

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

项目:wow-addon-updater 作者: kuhnerdm 项目源码 文件源码
def _assert_no_error(error, exception_class=None):
    """
    Checks the return code and throws an exception if there is an error to
    report
    """
    if error == 0:
        return

    cf_error_string = Security.SecCopyErrorMessageString(error, None)
    output = _cf_string_to_unicode(cf_error_string)
    CoreFoundation.CFRelease(cf_error_string)

    if output is None or output == u'':
        output = u'OSStatus %s' % error

    if exception_class is None:
        exception_class = ssl.SSLError

    raise exception_class(output)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号