MCPcopy Index your code
hub / github.com/python/cpython / _add_source_to_registry

Method _add_source_to_registry

Lib/logging/handlers.py:1171–1179  ·  view source on GitHub ↗
(appname, dllname, logtype)

Source from the content-addressed store, hash-verified

1169
1170 @staticmethod
1171 def _add_source_to_registry(appname, dllname, logtype):
1172 import winreg
1173
1174 key_path = f"SYSTEM\\CurrentControlSet\\Services\\EventLog\\{logtype}\\{appname}"
1175
1176 with winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, key_path) as key:
1177 if dllname:
1178 winreg.SetValueEx(key, "EventMessageFile", 0, winreg.REG_EXPAND_SZ, dllname)
1179 winreg.SetValueEx(key, "TypesSupported", 0, winreg.REG_DWORD, 7) # All types are supported
1180
1181 def getMessageID(self, record):
1182 """

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected