mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Handle case where Linux distros patch out certifi library
19deb7ad25 (commitcomment-93512291)
This commit is contained in:
parent
d294fff882
commit
9e8deb6287
1 changed files with 2 additions and 2 deletions
|
@ -1408,9 +1408,9 @@ title="{}" {}>{}</button>""".format(
|
|||
# The requests library copies the certs into a temporary folder on startup,
|
||||
# and chokes when the file is later missing due to temp file cleaners.
|
||||
# Work around the issue by accessing them once every 12 hours.
|
||||
import certifi
|
||||
from requests.certs import where # type: ignore[attr-defined]
|
||||
|
||||
with open(certifi.where(), "rb") as f:
|
||||
with open(where(), "rb") as f:
|
||||
f.read()
|
||||
|
||||
# Backups
|
||||
|
|
Loading…
Reference in a new issue