mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-15 13:19:23 +00:00
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 254ceabe78)
This commit is contained in:
parent
c417efabca
commit
9f9cfc995c
1 changed files with 3 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue