Skip to content

Don't throw an error when doing ui.message(None)#8645

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
dkager:i8055
Oct 5, 2018
Merged

Don't throw an error when doing ui.message(None)#8645
michaelDCurran merged 1 commit into
nvaccess:masterfrom
dkager:i8055

Conversation

@dkager

@dkager dkager commented Aug 18, 2018

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #8055.
Or really, assures that if ui.message() is ever called with parameter None, 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 NVDAObject has the name set to None. 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.message a bit instead of trying to resolve the root cause of this particular issue. speech.speakMessage, which calls speech.speakText, already checks for the value None.

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.

In particular, gracefully handle sending None to braille.BrailleHandler.message().
Comment thread source/braille.py
@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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we log a debugWarning for text being None

@michaelDCurran michaelDCurran merged commit e713f61 into nvaccess:master Oct 5, 2018
@nvaccessAuto nvaccessAuto added this to the 2018.4 milestone Oct 5, 2018
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.

Auto-completing e-mail addresses in Microsoft Outlook can cause an error

5 participants