mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
gh-114272: Allow _wmi audit test to succeed even if it times out (GH-114602)
This commit is contained in:
parent
30b7b4f73c
commit
442a299af0
1 changed files with 7 additions and 1 deletions
|
|
@ -487,7 +487,13 @@ def test_wmi_exec_query():
|
||||||
print(event, args[0])
|
print(event, args[0])
|
||||||
|
|
||||||
sys.addaudithook(hook)
|
sys.addaudithook(hook)
|
||||||
_wmi.exec_query("SELECT * FROM Win32_OperatingSystem")
|
try:
|
||||||
|
_wmi.exec_query("SELECT * FROM Win32_OperatingSystem")
|
||||||
|
except WindowsError as e:
|
||||||
|
# gh-112278: WMI may be slow response when first called, but we still
|
||||||
|
# get the audit event, so just ignore the timeout
|
||||||
|
if e.winerror != 258:
|
||||||
|
raise
|
||||||
|
|
||||||
def test_syslog():
|
def test_syslog():
|
||||||
import syslog
|
import syslog
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue