mirror of
https://github.com/python/cpython.git
synced 2026-03-30 00:21:21 +00:00
Change to improve speed of _fixupChildren
This commit is contained in:
parent
1ead698494
commit
ef7f3bf3b3
1 changed files with 5 additions and 2 deletions
|
|
@ -910,9 +910,12 @@ def _fixupChildren(self, ph, alogger):
|
|||
Ensure that children of the placeholder ph are connected to the
|
||||
specified logger.
|
||||
"""
|
||||
#for c in ph.loggers:
|
||||
name = alogger.name
|
||||
namelen = len(name)
|
||||
for c in ph.loggerMap.keys():
|
||||
if string.find(c.parent.name, alogger.name) <> 0:
|
||||
#The if means ... if not c.parent.name.startswith(nm)
|
||||
#if string.find(c.parent.name, nm) <> 0:
|
||||
if c.parent.name[:namelen] != name:
|
||||
alogger.parent = c.parent
|
||||
c.parent = alogger
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue