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

Fix access before variable defined bug in test_api #3727

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Feb 8, 2017

The worker_result variable was not guaranteed to have a 'result' or 'reason' key and accessing them before testing for them could result in an error when they are not provided. This patch changes the checks to prevent check for their existence before accessing them.

Moved this commit from #3706

The worker_result variable was not guaranteed to have a `'result'` or
`'reason'` key and accessing them before testing for them could result
in an error when they are not provided. This patch changes the checks to
prevent check for their existence before accessing them.
Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Looks legit 👍

@bridadan
Copy link
Contributor

bridadan commented Feb 8, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Feb 8, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1533

All builds and test passed!

@sg- sg- merged commit cf19bb6 into ARMmbed:master Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants