Interrupt port initialization when there is IOError exception#15239
Conversation
|
Thanks @burmancomp I won't be able to test this before monday as I have no display at hand until then. |
|
What are actually the cases where an IOError should continue the connection loop? I think I'd prefer an approach where an exception stops connecting unless, instead of an approach where an exception continues the connection loop unless. |
4f0ba5a to
cd77e35
Compare
|
I removed for loop, I feel it was there just for test/development reasons. |
See test results for failed build of commit b89082fc16 |
See test results for failed build of commit 46b0964ab0 |
|
The change log entry should be user focused. You suggest this fixes #15226. Is the following changelog entry accurate? "Fixed bug where Albatross braille displays fail to initialize if another braille device has been connected." |
|
@seanbudd: suggest "braille displays fail" instead of "braille displays fails"
|
|
Maybe this describes change: "Fixed bug where Albatross braille displays try to initialize although another braille device has been connected." I edited change log entry. |
Fixes #15226 Summary of the issue: Driver continued port initialization retries although there was IOError exception. Description of user facing changes Port initialization is stopped when there is IOError exception. Description of development approach If there is IoError exception, _initPort function returns None which causes _initConnection function to raise RuntimeError. No need to try with 9600 bps, and there is no other port to try.
Link to issue number:
Fixes #15226
Summary of the issue:
Driver continued port initialization retries although there was IOError exception.
Description of user facing changes
Port initialization is stopped when there is IOError exception.
Description of development approach
If port initialization fails, _initPort function raises IOError exception which causes _initConnection function to raise RuntimeError. No need to try with 9600 bps, and there is no other port to try.
Testing strategy:
Tested with Albatross 80.
Known issues with pull request:
none
Change log entries:
New features
Changes
Bug fixes
Fixed bug where Albatross braille displays try to initialize although another braille device has been connected.
For Developers
Code Review Checklist: