mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-19 23:44:01 +01:00
Updated requests package to v2.2.1
It was included, but never used. However, lots of code can improve from this.
This commit is contained in:
+11
-14
@@ -2,26 +2,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
ceritfi.py
|
||||
~~~~~~~~~~
|
||||
certs.py
|
||||
~~~~~~~~
|
||||
|
||||
This module returns the installation location of cacert.pem.
|
||||
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
|
||||
try:
|
||||
import certifi
|
||||
except ImportError:
|
||||
certifi = None
|
||||
import os.path
|
||||
|
||||
|
||||
def where():
|
||||
|
||||
if certifi:
|
||||
return certifi.where()
|
||||
else:
|
||||
f = os.path.split(__file__)[0]
|
||||
return os.path.join(f, 'cacert.pem')
|
||||
"""Return the preferred certificate bundle."""
|
||||
# vendored bundle inside Requests
|
||||
return os.path.join(os.path.dirname(__file__), 'cacert.pem')
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(where())
|
||||
|
||||
Reference in New Issue
Block a user