Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120512975
certs.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 4, 22:19
Size
613 B
Mime Type
text/x-python
Expires
Sun, Jul 6, 22:19 (2 d)
Engine
blob
Format
Raw Data
Handle
27185252
Attached To
R3852 EMS for Smart-Building
certs.py
View Options
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
certs.py
~~~~~~~~
This module returns the preferred default CA certificate bundle.
If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""
import
os.path
try
:
from
certifi
import
where
except
ImportError
:
def
where
():
"""Return the preferred certificate bundle."""
# vendored bundle inside Requests
return
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'cacert.pem'
)
if
__name__
==
'__main__'
:
print
(
where
())
Event Timeline
Log In to Comment