summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-10-06 20:22:13 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-10-06 20:22:13 (GMT)
commit22226c55955348644c8615738391570fdcb7d0be (patch)
tree0892fddba597332df0a6c483b86cddfae4c54f4a /Lib/test
parenta6d04cf4e697b3eb302e508bb04c47662463aaef (diff)
downloadcpython-22226c55955348644c8615738391570fdcb7d0be.zip
cpython-22226c55955348644c8615738391570fdcb7d0be.tar.gz
cpython-22226c55955348644c8615738391570fdcb7d0be.tar.bz2
Issue #25097: fix Windows error number access
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index be3d02c..f3df534 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'})