mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
parent
7517af4942
commit
19deb7ad25
2 changed files with 12 additions and 0 deletions
|
@ -1370,6 +1370,7 @@ title="{}" {}>{}</button>""".format(
|
|||
True,
|
||||
parent=self,
|
||||
)
|
||||
self.progress.timer(12 * 60 * 1000, self.refresh_certs, False, parent=self)
|
||||
|
||||
def onRefreshTimer(self) -> None:
|
||||
if self.state == "deckBrowser":
|
||||
|
@ -1385,6 +1386,15 @@ title="{}" {}>{}</button>""".format(
|
|||
if elap > minutes * 60:
|
||||
self.maybe_auto_sync_media()
|
||||
|
||||
def refresh_certs(self) -> None:
|
||||
# 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
|
||||
|
||||
with open(certifi.where(), "rb") as f:
|
||||
f.read()
|
||||
|
||||
# Backups
|
||||
##########################################################################
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ ignore_missing_imports = True
|
|||
ignore_missing_imports = True
|
||||
[mypy-stringcase]
|
||||
ignore_missing_imports = True
|
||||
[mypy-certifi]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-aqt.forms.*]
|
||||
disallow_untyped_defs = false
|
||||
|
|
Loading…
Reference in a new issue