Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
e63b7e2b
Commit
e63b7e2b
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Explicitly use certifi bundle in template verifier
parent
821fd397
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/template_verifier.py
+2
-1
2 additions, 1 deletion
scripts/template_verifier.py
with
2 additions
and
1 deletion
scripts/template_verifier.py
+
2
−
1
View file @
e63b7e2b
...
@@ -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
"
)))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment