handle an OSError exception

This commit is contained in:
Robin Dunn
2020-05-14 16:25:04 -07:00
parent 62f77a2860
commit 6c2251229f

View File

@@ -151,11 +151,13 @@ class ActiveXCtrl(wx.msw.PyAxBaseWindow):
# accelerators can be dealt with the way that the AXControl # accelerators can be dealt with the way that the AXControl
# wants them to be done. MSWTranslateMessage is called before # wants them to be done. MSWTranslateMessage is called before
# wxWidgets handles and eats the navigation keys itself. # wxWidgets handles and eats the navigation keys itself.
res = self.ipao.TranslateAccelerator(msg) try:
if res == hr.S_OK: res = self.ipao.TranslateAccelerator(msg)
return True if res == hr.S_OK:
else: return True
return super(ActiveXCtrl, self).MSWTranslateMessage(msg) except OSError:
pass
return super(ActiveXCtrl, self).MSWTranslateMessage(msg)
# TBD: Are the focus handlers needed? # TBD: Are the focus handlers needed?