File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 29
29
"""
30
30
31
31
import argparse
32
+ import certifi
32
33
import contextlib
33
34
import csv
34
35
import json
35
36
import os
36
37
import shlex
37
- import ssl
38
38
import subprocess # nosec B404 # disable import-subprocess check
39
39
import sys
40
40
import tempfile
@@ -241,11 +241,9 @@ def main():
241
241
242
242
print (f"{ len (demos_to_test )} demos will be tested:" )
243
243
print (* [demo .subdirectory for demo in demos_to_test ], sep = ',' )
244
-
245
- no_verify_because_of_windows = ssl .create_default_context ()
246
- no_verify_because_of_windows .check_hostname = False
247
- no_verify_because_of_windows .verify_mode = ssl .CERT_NONE
248
- with urlopen (COCO128_URL , context = no_verify_because_of_windows ) as zipresp : # nosec B310 # disable urllib_urlopen because url is hardcoded
244
+ os .environ ["REQUESTS_CA_BUNDLE" ] = certifi .where ()
245
+ os .environ ["SSL_CERT_FILE" ] = certifi .where ()
246
+ with urlopen (COCO128_URL ) as zipresp : # nosec B310 # disable urllib_urlopen because url is hardcoded
249
247
with ZipFile (BytesIO (zipresp .read ())) as zfile :
250
248
zfile .extractall (args .test_data_dir )
251
249
You can’t perform that action at this time.
0 commit comments