From 22226c55955348644c8615738391570fdcb7d0be Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Tue, 6 Oct 2015 15:22:13 -0500 Subject: [PATCH] Issue #25097: fix Windows error number access --- Lib/test/test_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index be3d02c44b..f3df5346e1 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -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'}) -- 2.40.0