tools/pyterm: catch serial.Exception when serial port is busy#10481
Merged
miri64 merged 1 commit intoRIOT-OS:masterfrom Nov 27, 2018
Merged
tools/pyterm: catch serial.Exception when serial port is busy#10481miri64 merged 1 commit intoRIOT-OS:masterfrom
miri64 merged 1 commit intoRIOT-OS:masterfrom
Conversation
Contributor
Author
|
I just pushed an update that catch serial.Exception in a separate block. Otherwise the displayed message was a bit redundant: |
Member
|
(please squash) |
This can happen when opening a terminal right after flashing a board that has just been plugged
8c05d43 to
98413e4
Compare
Contributor
Author
Just did. Thanks for reviewing! |
Member
|
I've got an idea during the review, I put into a follow-up: #10482 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR is fixing an exception not being catched when the serial port is not ready and one tries to open the terminal using pyterm (e.g make term).
This happens when opening a terminal right after flashing a board that has just been plugged.
Testing procedure
default:Without this PR, the exception is not catched and the traceback is printed, which is not nice:
With this PR the serial.Exception is catched and only the error message is displayed:
Issues/PRs references
None