diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2012-06-28 15:58:00 -0700 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2012-06-28 15:58:00 -0700 |
| commit | c3ad7af06c5fdd603d4ac114cfa114a12a386d10 (patch) | |
| tree | 61603ce2ed18b59bf592f73ceba08a5e785dbbff /requests/certs.py | |
| parent | 1253c780113a26872d320a76489d252ff281492b (diff) | |
| download | python-requests-c3ad7af06c5fdd603d4ac114cfa114a12a386d10.tar.gz | |
include certifi
Diffstat (limited to 'requests/certs.py')
| -rw-r--r-- | requests/certs.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/requests/certs.py b/requests/certs.py new file mode 100644 index 00000000..42df2f89 --- /dev/null +++ b/requests/certs.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +ceritfi.py +~~~~~~~~~~ + +This module returns the installation location of cacert.pem. +""" + +import os +try: + import certifi +except ImportError: + certifi = None + + +def where(): + + if certifi: + return certifi.where() + else: + f = os.path.split(__file__)[0] + return os.path.join(f, 'cacert.pem') + +if __name__ == '__main__': + print(where()) |
