Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
9334bc1f
Unverified
Commit
9334bc1f
authored
6 months ago
by
Max Gautier
Browse files
Options
Downloads
Patches
Plain Diff
support components with no premade hashes
parent
c94daa4f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/download_hash.py
+3
-0
3 additions, 0 deletions
scripts/download_hash.py
with
3 additions
and
0 deletions
scripts/download_hash.py
+
3
−
0
View file @
9334bc1f
...
@@ -12,6 +12,7 @@ from collections import defaultdict
...
@@ -12,6 +12,7 @@ from collections import defaultdict
from
functools
import
cache
from
functools
import
cache
import
argparse
import
argparse
import
requests
import
requests
import
hashlib
from
ruamel.yaml
import
YAML
from
ruamel.yaml
import
YAML
from
packaging.version
import
Version
,
InvalidVersion
from
packaging.version
import
Version
,
InvalidVersion
...
@@ -217,6 +218,8 @@ def download_hash(only_downloads: [str]) -> None:
...
@@ -217,6 +218,8 @@ def download_hash(only_downloads: [str]) -> None:
),
),
allow_redirects
=
True
)
allow_redirects
=
True
)
hash_file
.
raise_for_status
()
hash_file
.
raise_for_status
()
if
downloads
[
component
].
get
(
'
binary
'
,
False
):
return
hashlib
.
sha256
(
hash_file
.
content
).
hexdigest
()
return
(
hash_file
.
content
.
decode
().
split
()[
0
])
return
(
hash_file
.
content
.
decode
().
split
()[
0
])
...
...
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