Commit 9b12dd9c authored by Eric Larson's avatar Eric Larson

Import resource_filename from pkg_resources

--HG--
extra : source : 14737efaf19e5a19c92f54c94163003d381aed0b
parent dd5da9cf
import sys, os, socket, urllib2, atexit, re
from pkg_resources import ResolutionError, ExtractionError
from pkg_resources import ResolutionError, ExtractionError, resource_filename
try:
import ssl
......@@ -236,7 +236,7 @@ def find_ca_bundle():
if os.path.isfile(cert_path):
return cert_path
try:
return pkg_resources.resource_filename('certifi', 'cacert.pem')
return resource_filename('certifi', 'cacert.pem')
except (ImportError, ResolutionError, ExtractionError):
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