Don't throw an error when doing ui.message(None)#8645
Merged
Conversation
In particular, gracefully handle sending None to braille.BrailleHandler.message().
LeonarddeR
approved these changes
Aug 18, 2018
derekriemer
reviewed
Sep 12, 2018
| @postcondition: The message is displayed. | ||
| """ | ||
| if not self.enabled or config.conf["braille"]["messageTimeout"] == 0: | ||
| if not self.enabled or config.conf["braille"]["messageTimeout"] == 0 or text is None: |
Collaborator
There was a problem hiding this comment.
Should we log a debugWarning for text being None
michaelDCurran
approved these changes
Oct 5, 2018
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.
Link to issue number:
Fixes #8055.
Or really, assures that if
ui.message()is ever called with parameterNone, this does not throw an error.Summary of the issue:
Apparently, Outlook 2013/2016 can sometimes have e-mail address auto-completion results where the corresponding
NVDAObjecthas the name set toNone. When sending this as a message to a braille display, an error was raised.Description of how this pull request fixes the issue:
Since especially Office 365 is constantly changing, this issue hardens
braille.BrailleHandler.messagea bit instead of trying to resolve the root cause of this particular issue.speech.speakMessage, which callsspeech.speakText, already checks for the valueNone.Testing performed:
Called
ui.message(None)from the Python console.Known issues with pull request:
This PR does not resolve the root cause in Outlook 2013/2016. However, few people were able to reproduce it. Auto-completion in Outlook 2016 is further covered by #8502.
Change log entry:
None.