Valentin David pushed to branch valentindavid/wrong_type_in_status_code at BuildStream / buildstream
Commits:
-
4ba240f7
by Valentin David at 2019-01-23T16:09:53Z
1 changed file:
Changes:
... | ... | @@ -324,7 +324,7 @@ class _ContentAddressableStorageServicer(remote_execution_pb2_grpc.ContentAddres |
324 | 324 |
blob_response.digest.size_bytes = digest.size_bytes
|
325 | 325 |
|
326 | 326 |
if len(blob_request.data) != digest.size_bytes:
|
327 |
- blob_response.status.code = grpc.StatusCode.FAILED_PRECONDITION
|
|
327 |
+ blob_response.status.code = code_pb2.FAILED_PRECONDITION
|
|
328 | 328 |
continue
|
329 | 329 |
|
330 | 330 |
try:
|
... | ... | @@ -335,10 +335,10 @@ class _ContentAddressableStorageServicer(remote_execution_pb2_grpc.ContentAddres |
335 | 335 |
out.flush()
|
336 | 336 |
server_digest = self.cas.add_object(path=out.name)
|
337 | 337 |
if server_digest.hash != digest.hash:
|
338 |
- blob_response.status.code = grpc.StatusCode.FAILED_PRECONDITION
|
|
338 |
+ blob_response.status.code = code_pb2.FAILED_PRECONDITION
|
|
339 | 339 |
|
340 | 340 |
except ArtifactTooLargeException:
|
341 |
- blob_response.status.code = grpc.StatusCode.RESOURCE_EXHAUSTED
|
|
341 |
+ blob_response.status.code = code_pb2.RESOURCE_EXHAUSTED
|
|
342 | 342 |
|
343 | 343 |
return response
|
344 | 344 |
|