Skip to content

Commit

Permalink
fix(linux): Fix attribute error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ermshiperete committed Jan 7, 2022
1 parent a01de13 commit 254ceab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions linux/keyman-config/keyman_config/get_kmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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:
Expand Down Expand Up @@ -75,7 +75,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:
Expand Down Expand Up @@ -203,7 +203,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:
Expand Down

0 comments on commit 254ceab

Please sign in to comment.