From: Zachary Ware Date: Tue, 6 Oct 2015 20:22:13 +0000 (-0500) Subject: Issue #25097: fix Windows error number access X-Git-Tag: v3.5.1rc1~205^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22226c55955348644c8615738391570fdcb7d0be;p=python Issue #25097: fix Windows error number access --- 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'})