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.
1 parent 8bf1ddc commit 9df7120Copy full SHA for 9df7120
Lib/test/audit-tests.py
@@ -487,7 +487,13 @@ def hook(event, args):
487
print(event, args[0])
488
489
sys.addaudithook(hook)
490
- _wmi.exec_query("SELECT * FROM Win32_OperatingSystem")
+ try:
491
+ _wmi.exec_query("SELECT * FROM Win32_OperatingSystem")
492
+ except WindowsError as e:
493
+ # gh-112278: WMI may be slow response when first called, but we still
494
+ # get the audit event, so just ignore the timeout
495
+ if e.winerror != 258:
496
+ raise
497
498
def test_syslog():
499
import syslog
0 commit comments