Issue #25097: fix Windows error number access

This commit is contained in:
Zachary Ware 2015-10-06 15:22:13 -05:00
parent a6d04cf4e6
commit 22226c5595
1 changed files with 1 additions and 1 deletions

View File

@ -4104,7 +4104,7 @@ class NTEventLogHandlerTest(BaseTest):
try: try:
h = logging.handlers.NTEventLogHandler('test_logging') h = logging.handlers.NTEventLogHandler('test_logging')
except pywintypes.error as e: 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') raise unittest.SkipTest('Insufficient privileges to run test')
r = logging.makeLogRecord({'msg': 'Test Log Message'}) r = logging.makeLogRecord({'msg': 'Test Log Message'})