python类__init__()的实例源码

ssl_support.py 文件源码 项目:noc-orchestrator 作者: DirceuSilvaLabs 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name
ssl_support.py 文件源码 项目:zanph 作者: zanph 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:zanph 作者: zanph 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:zanph 作者: zanph 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name
ssl_support.py 文件源码 项目:ascii-art-py 作者: blinglnav 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:ascii-art-py 作者: blinglnav 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:ascii-art-py 作者: blinglnav 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name
ssl_support.py 文件源码 项目:aws-cfn-plex 作者: lordmuffin 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:aws-cfn-plex 作者: lordmuffin 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:aws-cfn-plex 作者: lordmuffin 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name
ssl_support.py 文件源码 项目:isni-reconcile 作者: cmh2166 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:isni-reconcile 作者: cmh2166 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:flasky 作者: RoseOu 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:threatdetectionservice 作者: flyballlabs 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:threatdetectionservice 作者: flyballlabs 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:threatdetectionservice 作者: flyballlabs 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):

        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name
ssl_support.py 文件源码 项目:oa_qian 作者: sunqb 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, ca_bundle):
        self.ca_bundle = ca_bundle
        HTTPSHandler.__init__(self)
ssl_support.py 文件源码 项目:oa_qian 作者: sunqb 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def __init__(self, host, ca_bundle, **kw):
        HTTPSConnection.__init__(self, host, **kw)
        self.ca_bundle = ca_bundle
ssl_support.py 文件源码 项目:oa_qian 作者: sunqb 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def get_win_certfile():
    global _wincerts
    if _wincerts is not None:
        return _wincerts.name

    try:
        from wincertstore import CertFile
    except ImportError:
        return None

    class MyCertFile(CertFile):
        def __init__(self, stores=(), certs=()):
            CertFile.__init__(self)
            for store in stores:
                self.addstore(store)
            self.addcerts(certs)
            atexit.register(self.close)

        def close(self):
            try:
                super(MyCertFile, self).close()
            except OSError:
                pass

    _wincerts = MyCertFile(stores=['CA', 'ROOT'])
    return _wincerts.name


问题


面经


文章

微信
公众号

扫码关注公众号