certs.py
This file
Path
requests/certs.py
25 lines · 625 bytes · Python
Last changed by
Merge pull request #3429 from nateprewitt/docstring_cleanupKenneth Reitzbefore adoptionfb01456
History of this fileTake it
1#!/usr/bin/env python2# -*- coding: utf-8 -*-34"""5requests.certs6~~~~~~~~~~~~~~78This module returns the preferred default CA certificate bundle.910If you are packaging Requests, e.g., for a Linux distribution or a managed11environment, you can change the definition of where() to return a separately12packaged CA bundle.13"""14import os.path1516try:17 from certifi import where18except ImportError:19 def where():20 """Return the preferred certificate bundle."""21 # vendored bundle inside Requests22 return os.path.join(os.path.dirname(__file__), 'cacert.pem')2324if __name__ == '__main__':25 print(where())