當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。