Commit 4b6e1f43 authored by Jason R. Coombs's avatar Jason R. Coombs

Prefer namespaced usage

parent 9b12dd9c
import sys, os, socket, urllib2, atexit, re import sys, os, socket, urllib2, atexit, re
from pkg_resources import ResolutionError, ExtractionError, resource_filename import pkg_resources
from pkg_resources import ResolutionError, ExtractionError
try: try:
import ssl import ssl
...@@ -236,7 +237,7 @@ def find_ca_bundle(): ...@@ -236,7 +237,7 @@ def find_ca_bundle():
if os.path.isfile(cert_path): if os.path.isfile(cert_path):
return cert_path return cert_path
try: try:
return resource_filename('certifi', 'cacert.pem') return pkg_resources.resource_filename('certifi', 'cacert.pem')
except (ImportError, ResolutionError, ExtractionError): except (ImportError, ResolutionError, ExtractionError):
return None return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment