From 9f9cfc995c19fdb4af09b0ec72f0db1bff213af6 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 7 Jan 2022 17:22:53 +0100 Subject: [PATCH] fix(linux): Fix attribute error Newer versions of requests-cache (>= 0.6) restructure some code so that the _core_ namespace is no longer available. However, it turns out that we don't need to specify that namespace at all, so this change will work with both older and newer versions of requests-cache. This will fix #6085. (cherry picked from commit 254ceabe780fc810059fbcb4caae95334583d1cb) --- linux/keyman-config/keyman_config/get_kmp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/keyman-config/keyman_config/get_kmp.py b/linux/keyman-config/keyman_config/get_kmp.py index bf5eb00a32..b42f9563ed 100755 --- a/linux/keyman-config/keyman_config/get_kmp.py +++ b/linux/keyman-config/keyman_config/get_kmp.py @@ -34,7 +34,7 @@ def get_package_download_data(packageID, weekCache=False): response = requests.get(api_url) logging.debug("Time: {0} / Used Cache: {1}".format(now, response.from_cache)) os.chdir(current_dir) - requests_cache.core.uninstall_cache() + requests_cache.uninstall_cache() if response.status_code == 200: return response.json() else: @@ -66,7 +66,7 @@ def get_keyboard_data(keyboardID, weekCache=False): response = requests.get(api_url) logging.debug("Time: {0} / Used Cache: {1}".format(now, response.from_cache)) os.chdir(current_dir) - requests_cache.core.uninstall_cache() + requests_cache.uninstall_cache() if response.status_code == 200: return response.json() else: @@ -168,7 +168,7 @@ def download_kmp_file(url, kmpfile, cache=False): if cache: logging.debug("Time: {0} / Used Cache: {1}".format(now, response.from_cache)) os.chdir(current_dir) - requests_cache.core.uninstall_cache() + requests_cache.uninstall_cache() if response.status_code == 200: with open(kmpfile, 'wb') as f: