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:
Bas Stottelaar
2014-04-05 14:57:59 +02:00
parent ea6e3335a3
commit 667f768749
122 changed files with 10284 additions and 16040 deletions
+11 -14
View File
@@ -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())