Commit 22226c55 authored by Zachary Ware's avatar Zachary Ware

Issue #25097: fix Windows error number access

parent a6d04cf4
......@@ -4104,7 +4104,7 @@ class NTEventLogHandlerTest(BaseTest):
try:
h = logging.handlers.NTEventLogHandler('test_logging')
except pywintypes.error as e:
if e[0] == 5: # access denied
if e.winerror == 5: # access denied
raise unittest.SkipTest('Insufficient privileges to run test')
r = logging.makeLogRecord({'msg': 'Test Log Message'})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment