nvda
20342a38 - Resolve variable masking issue in ui.browseableMessage (#16380)

Commit
1 year ago
Resolve variable masking issue in ui.browseableMessage (#16380) Fix-up of PR from GHSA-xg6w-23rw-39r8. Summary of the issue: A masking issue was found in ui.browseableMessage where we try to call the module level function message but it is masked by the local variable message which is an argument of ui.browseableMessage. Description of user facing changes In case an installation cannot create a Scripting.Dictionary COM object, a message will now be reported. Description of development approach I access the module level message function through globals() dictionary and store it in a new local variable to use it. It would have been cleaner to rename the argument of ui.browseableMessage but I have not done so because changing the signature of a function is API-breaking. I have also caught one more exception type because I have realized while testing that calling comtypes.client.CreateObject with an unknown class string raises OSError.
Author
Parents
Loading