Skip to content

Return None from MbedTerminal Constructor #765

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

Merged
merged 2 commits into from
Oct 2, 2018

Conversation

theotherjimmy
Copy link
Contributor

Since we examine self.serial to determine the success of the
constructor, I made all return False statements within the constructor
set self.serial = None. That way the current code should catch the
failures without any additional changes

Fixes #688

Since we examine `self.serial` to determine the success of the
constructor, I made all `return False` statements within the constructor
set `self.serial = None`. That way the current code should catch the
failures without any additional changes

Fixes ARMmbed#688
Since the prior commit made it impossible to distinguish between
these 2 types of failure, I lumped them all into a single `try`
so that they can share logic. It's a bit shorted this way
@theotherjimmy
Copy link
Contributor Author

@screamerbg This makes the current behavior not produce the warning. I'm not sure if you wanted to distinguish between these failure modes. If you do, we may have to change the API of the MbedTerminal class to distinguish these errors.

Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants