当前位置: 首页>>代码示例>>Python>>正文


Python ssl_support.find_ca_bundle方法代码示例

本文整理汇总了Python中setuptools.ssl_support.find_ca_bundle方法的典型用法代码示例。如果您正苦于以下问题:Python ssl_support.find_ca_bundle方法的具体用法?Python ssl_support.find_ca_bundle怎么用?Python ssl_support.find_ca_bundle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools.ssl_support的用法示例。


在下文中一共展示了ssl_support.find_ca_bundle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self, *args, **kw)
        self.index_url = index_url + "/" [:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        use_ssl = (
            verify_ssl
            and ssl_support.is_available
            and (ca_bundle or ssl_support.find_ca_bundle())
        )
        if use_ssl:
            self.opener = ssl_support.opener_for(ca_bundle)
        else:
            self.opener = urllib.request.urlopen 
开发者ID:sofia-netsurv,项目名称:python-netsurv,代码行数:22,代码来源:package_index.py

示例2: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.org/simple/", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
    ):
        Environment.__init__(self, *args, **kw)
        self.index_url = index_url + "/" [:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        use_ssl = (
            verify_ssl
            and ssl_support.is_available
            and (ca_bundle or ssl_support.find_ca_bundle())
        )
        if use_ssl:
            self.opener = ssl_support.opener_for(ca_bundle)
        else:
            self.opener = urllib.request.urlopen 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:22,代码来源:package_index.py

示例3: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self, *args, **kw)
        self.index_url = index_url + "/"[:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        use_ssl = (
            verify_ssl
            and ssl_support.is_available
            and (ca_bundle or ssl_support.find_ca_bundle())
        )
        if use_ssl:
            self.opener = ssl_support.opener_for(ca_bundle)
        else:
            self.opener = urllib.request.urlopen 
开发者ID:awemulya,项目名称:kobo-predict,代码行数:22,代码来源:package_index.py

示例4: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
    ):
        Environment.__init__(self, *args, **kw)
        self.index_url = index_url + "/" [:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate, hosts))).match
        self.to_scan = []
        use_ssl = (
            verify_ssl
            and ssl_support.is_available
            and (ca_bundle or ssl_support.find_ca_bundle())
        )
        if use_ssl:
            self.opener = ssl_support.opener_for(ca_bundle)
        else:
            self.opener = urllib.request.urlopen 
开发者ID:italia,项目名称:anpr,代码行数:22,代码来源:package_index.py

示例5: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self,*args,**kw)
        self.index_url = index_url + "/"[:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate,hosts))).match
        self.to_scan = []
        if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()):
            self.opener = ssl_support.opener_for(ca_bundle)
        else: self.opener = urllib.request.urlopen 
开发者ID:jpush,项目名称:jbox,代码行数:16,代码来源:package_index.py

示例6: __init__

# 需要导入模块: from setuptools import ssl_support [as 别名]
# 或者: from setuptools.ssl_support import find_ca_bundle [as 别名]
def __init__(
            self, index_url="https://pypi.python.org/simple", hosts=('*',),
            ca_bundle=None, verify_ssl=True, *args, **kw
            ):
        Environment.__init__(self,*args,**kw)
        self.index_url = index_url + "/"[:not index_url.endswith('/')]
        self.scanned_urls = {}
        self.fetched_urls = {}
        self.package_pages = {}
        self.allows = re.compile('|'.join(map(translate,hosts))).match
        self.to_scan = []
        if verify_ssl and ssl_support.is_available and (ca_bundle or ssl_support.find_ca_bundle()):
            self.opener = ssl_support.opener_for(ca_bundle)
        else: self.opener = urllib2.urlopen 
开发者ID:MayOneUS,项目名称:pledgeservice,代码行数:16,代码来源:package_index.py


注:本文中的setuptools.ssl_support.find_ca_bundle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。