From a9ab4d847b0c2d36a5be19e1f4c89c2c2eaf2216 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Thu, 30 Dec 2021 19:27:04 +0000 Subject: [PATCH] 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) --- linkcheck/configuration/__init__.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/linkcheck/configuration/__init__.py b/linkcheck/configuration/__init__.py index f2efb18d..42bd2ba1 100644 --- a/linkcheck/configuration/__init__.py +++ b/linkcheck/configuration/__init__.py @@ -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():