- A gui.nvdaControls.MessageDialog with default type of standard, no longer throws a None conversion exception because no sound is assigned. (#16223)
Summary of the issue:
Using gui.nvdaControls.MessageDialog with standard type (the default), generates this exception:
ERROR - unhandled exception (03:21:22.395) - MainThread (16784):
Traceback (most recent call last):
File "gui\nvdaControls.pyc", line 335, in _onShowEvt
File "gui\nvdaControls.pyc", line 294, in _playSound
TypeError: 'NoneType' object cannot be interpreted as an integer
This is happening because there is no sound assigned for standard type dialogs, but the method which plays sound does not check for this. Which, ironically, caused a sound, at least in test builds.
Description of user facing changes
Beta/alpha users will no longer hear an error sound when one of these is used.
Description of development approach
Check whether the int is actually a None, before trying to play the sound. If so, don't play it.