Commit 62ccfce2 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow the spec: read returned hash.

And use this hash to check if upload was successful or not.
parent ebbd6e08
......@@ -109,7 +109,7 @@ class NetworkcacheClient(object):
finally:
shacache_connection.close()
if result.status != 201:
if result.status != 201 or data != sha512sum:
raise UploadError('Failed to upload the file to SHACACHE Server.' \
'URL: %s. Response code: %s. Response data: %s' % \
(self.shacache_host, result.status, data))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment