We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pywintypes.error
1 parent f3fa071 commit b794153Copy full SHA for b794153
can/broadcastmanager.py
@@ -22,6 +22,7 @@
22
# try to import win32event for event-based cyclic send task (needs the pywin32 package)
23
USE_WINDOWS_EVENTS = False
24
try:
25
+ import pywintypes
26
import win32event
27
28
# Python 3.11 provides a more precise sleep implementation on Windows, so this is not necessary.
@@ -263,7 +264,7 @@ def __init__(
263
264
win32event.CREATE_WAITABLE_TIMER_HIGH_RESOLUTION,
265
win32event.TIMER_ALL_ACCESS,
266
)
- except (AttributeError, OSError):
267
+ except (AttributeError, OSError, pywintypes.error):
268
self.event = win32event.CreateWaitableTimer(None, False, None)
269
270
self.start()
0 commit comments