Remove get_share_file()

cacert.pem not used since:
e3ab9024 ("Remove platform-specific installer stuff and ensure a build .whl wheel file can be built.", 2016-01-17)
This commit is contained in:
Chris Mayo 2021-12-30 19:27:04 +00:00
parent 2fa0016ae9
commit a9ab4d847b

View file

@ -94,30 +94,6 @@ def get_share_dir():
return os.path.join(get_install_data(), "share", "linkchecker")
def get_share_file(filename, devel_dir=None):
"""Return a filename in the share directory.
@param devel_dir: directory to search when developing
@type devel_dir: string
@param filename: filename to search for
@type filename: string
@return: the found filename or None
@rtype: string
@raises: ValueError if not found
"""
paths = [get_share_dir()]
if devel_dir is not None:
# when developing
paths.insert(0, devel_dir)
for path in paths:
fullpath = os.path.join(path, filename)
if os.path.isfile(fullpath):
return fullpath
# not found
msg = "%s not found in %s; check your installation" % (filename, paths)
raise ValueError(msg)
def get_system_cert_file():
"""Try to find a system-wide SSL certificate file.
@return: the filename to the cert file
@ -335,10 +311,7 @@ class Configuration(dict):
try:
self["sslverify"] = get_certifi_file()
except (ValueError, ImportError):
try:
self["sslverify"] = get_share_file('cacert.pem')
except ValueError:
pass
pass
def get_user_data():