mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
add envvar to disable ssl verification
This commit is contained in:
parent
844778636c
commit
d44ec04751
1 changed files with 7 additions and 0 deletions
|
@ -494,6 +494,13 @@ class AnkiRequestsClient:
|
||||||
from anki import version
|
from anki import version
|
||||||
return "Anki {}".format(version)
|
return "Anki {}".format(version)
|
||||||
|
|
||||||
|
# allow user to accept invalid certs in work/school settings
|
||||||
|
if os.environ.get("ANKI_NOVERIFYSSL"):
|
||||||
|
AnkiRequestsClient.verify = False
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
class _MonitoringFile(io.BufferedReader):
|
class _MonitoringFile(io.BufferedReader):
|
||||||
def read(self, size=-1):
|
def read(self, size=-1):
|
||||||
data = io.BufferedReader.read(self, HTTP_BUF_SIZE)
|
data = io.BufferedReader.read(self, HTTP_BUF_SIZE)
|
||||||
|
|
Loading…
Reference in a new issue