diff --git a/lib/pystray/_util/win32.py b/lib/pystray/_util/win32.py index c053e9d..e9a8f23 100644 --- a/lib/pystray/_util/win32.py +++ b/lib/pystray/_util/win32.py @@ -346,7 +346,7 @@ def _err(result, func, arguments): ChangeWindowMessageFilterEx.restype = wintypes.BOOL ChangeWindowMessageFilterEx.errcheck = _err -except KeyError: +except (KeyError, AttributeError): def ChangeWindowMessageFilterEx( hWnd, message, action, pCHangeFilterStruct): """A dummy implementation of ``ChangeWindowMessageFilterEx`` always