Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check call.trailing_metadata() for None before iterating it #19708

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Check call.trailing_metadata() for None before iterating it #19708

merged 1 commit into from
Jul 23, 2019

Conversation

igorzhilianin
Copy link
Contributor

In case of handling exception within intercepted call, grpc._interceptor._FailureOutcome.trailing_metadata() will return None, causing
rpc_status.from_call() called from inside of interceptor to raise "TypeError: 'NoneType' object is not iterable".

There is a fix.

@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

@igorzhilianin igorzhilianin changed the title Handle None in call.trailing_metadata() in rpc_status Check call.trailing_metadata() for None before iterating it Jul 22, 2019
@gnossen gnossen self-requested a review July 22, 2019 23:53
@gnossen gnossen self-assigned this Jul 22, 2019
Copy link
Contributor

@lidizheng lidizheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. I thought one LGTM is sufficient.

@lidizheng lidizheng added the release notes: yes Indicates if PR needs to be in release notes label Jul 23, 2019
@lidizheng lidizheng merged commit b0c9849 into grpc:master Jul 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug lang/Python priority/P2 release notes: yes Indicates if PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants