|
|
@ -39,10 +39,11 @@ class FirstServiceServicer(services_pb2_grpc.FirstServiceServicer): |
|
|
|
try: |
|
|
|
try: |
|
|
|
context.abort(grpc.StatusCode.PERMISSION_DENIED, |
|
|
|
context.abort(grpc.StatusCode.PERMISSION_DENIED, |
|
|
|
"Denying permission to test abort.") |
|
|
|
"Denying permission to test abort.") |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: # pylint: disable=broad-except |
|
|
|
self._abort_response = _application_common.ABORT_SUCCESS_RESPONSE |
|
|
|
self._abort_response = _application_common.ABORT_SUCCESS_RESPONSE |
|
|
|
else: |
|
|
|
else: |
|
|
|
self._abort_status = _application_common.ABORT_FAILURE_RESPONSE |
|
|
|
self._abort_status = _application_common.ABORT_FAILURE_RESPONSE |
|
|
|
|
|
|
|
return None # NOTE: For the linter. |
|
|
|
elif request == _application_common.ABORT_SUCCESS_QUERY: |
|
|
|
elif request == _application_common.ABORT_SUCCESS_QUERY: |
|
|
|
with self._abort_lock: |
|
|
|
with self._abort_lock: |
|
|
|
return self._abort_response |
|
|
|
return self._abort_response |
|
|
|