Merge pull request #17317 from mehrdada/fix-interceptor-bug

Fix Python blocking interceptors facing RpcError
pull/17329/head
Lidi Zheng 6 years ago committed by GitHub
commit 1b9df7d183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      AUTHORS
  2. 8
      src/python/grpcio/grpc/_interceptor.py

@ -1,2 +1,3 @@
Dropbox, Inc.
Google Inc.
WeWork Companies Inc.

@ -232,8 +232,8 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
credentials=new_credentials,
wait_for_ready=new_wait_for_ready)
return _UnaryOutcome(response, call)
except grpc.RpcError:
raise
except grpc.RpcError as rpc_error:
return rpc_error
except Exception as exception: # pylint:disable=broad-except
return _FailureOutcome(exception, sys.exc_info()[2])
@ -354,8 +354,8 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
credentials=new_credentials,
wait_for_ready=new_wait_for_ready)
return _UnaryOutcome(response, call)
except grpc.RpcError:
raise
except grpc.RpcError as rpc_error:
return rpc_error
except Exception as exception: # pylint:disable=broad-except
return _FailureOutcome(exception, sys.exc_info()[2])

Loading…
Cancel
Save