Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.libnetworkcache
Commits
b6989acf
Commit
b6989acf
authored
Jun 07, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! download: verify checksum of downloaded data
parent
316d365a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/libnetworkcache.py
slapos/libnetworkcache.py
+3
-3
No files found.
slapos/libnetworkcache.py
View file @
b6989acf
...
...
@@ -90,9 +90,9 @@ class CheckResponse(object):
def
read
(
self
,
amt
=
None
):
r
=
self
.
_response
.
read
(
amt
)
if
r
:
self
.
_sha512sum
.
update
(
r
)
elif
amt
!=
0
and
self
.
_expected
!=
self
.
_sha512sum
.
hexdigest
():
if
(
not
r
if
amt
else
amt
is
None
)
and
\
self
.
_expected
!=
self
.
_sha512sum
.
hexdigest
():
raise
NetworkcacheException
(
'Failed to download data to SHACACHE Server: invalid checksum.'
)
return
r
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment