Handle case where Linux distros patch out certifi library

19deb7ad25 (commitcomment-93512291)
This commit is contained in:
Damien Elmes 2022-12-20 11:18:32 +10:00
parent d294fff882
commit 9e8deb6287

View file

@ -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