[New-bugs-announce] [issue25097] test_logging may fail with 'Access is denied' when pywin32 is installed

Zachary Ware report at bugs.python.org
Mon Sep 14 06:21:07 CEST 2015


New submission from Zachary Ware:

With an installed Python with pywin32 installed, running the test as a non-privileged user:

======================================================================
ERROR: test_basic (test.test_logging.NTEventLogHandlerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python34\lib\test\test_logging.py", line 4108, in test_basic
    h = logging.handlers.NTEventLogHandler('test_logging')
  File "C:\Python34\lib\logging\handlers.py", line 1011, in __init__
    self._welu.AddSourceToRegistry(appname, dllname, logtype)
  File "C:\Python34\lib\site-packages\win32\lib\win32evtlogutil.py", line 35, in AddSourceToRegistry
    "SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName))
pywintypes.error: (5, 'RegCreateKey', 'Access is denied.')


The test should skip in the case of 'Access is denied'.

Assumed to affect 2.7 and up, but haven't checked anything but 3.4.

----------
components: Library (Lib), Windows
keywords: easy
messages: 250610
nosy: paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: test_logging may fail with 'Access is denied' when pywin32 is installed
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25097>
_______________________________________


More information about the New-bugs-announce mailing list