Skip to content
Snippets Groups Projects
Commit e63b7e2b authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Explicitly use certifi bundle in template verifier

parent 821fd397
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
import sys import sys
import os.path import os.path
import certifi
# Look for indra/lib/python in all possible parent directories ... # Look for indra/lib/python in all possible parent directories ...
# This is an improvement over the setup-path.py method used previously: # This is an improvement over the setup-path.py method used previously:
...@@ -141,7 +142,7 @@ def fetch(url): ...@@ -141,7 +142,7 @@ def fetch(url):
with open(file_name, 'rb') as f: with open(file_name, 'rb') as f:
return f.read() return f.read()
else: else:
with urllib.request.urlopen(url) as res: with urllib.request.urlopen(url, cafile=certifi.where()) as res:
body = res.read() body = res.read()
if res.status > 299: if res.status > 299:
sys.exit("ERROR: Unable to download %s. HTTP status %d.\n%s" % (url, res.status, body.decode("utf-8"))) sys.exit("ERROR: Unable to download %s. HTTP status %d.\n%s" % (url, res.status, body.decode("utf-8")))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment