summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 17:59:50 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 17:59:50 (GMT)
commite783553daaf27d05388d0190ffbf4d0d0a221fba (patch)
treed02eeee4c011672cd3ead5ffac427ba08acb4269 /Lib/logging
parent2ae5cffb3abcf28c45ef6de2135aebc05bbbd9f5 (diff)
parent3f84b07816fc63dd4996146bdd757f6bc81c54a9 (diff)
downloadcpython-e783553daaf27d05388d0190ffbf4d0d0a221fba.zip
cpython-e783553daaf27d05388d0190ffbf4d0d0a221fba.tar.gz
cpython-e783553daaf27d05388d0190ffbf4d0d0a221fba.tar.bz2
#Issue 11424: merged fix from 3.1.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 5afdf9f..52797ce 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -226,14 +226,14 @@ def _install_loggers(cp, handlers, disable_existing):
propagate = section.getint("propagate", fallback=1)
logger = logging.getLogger(qn)
if qn in existing:
- i = existing.index(qn)
+ i = existing.index(qn) + 1 # start with the entry after qn
prefixed = qn + "."
pflen = len(prefixed)
num_existing = len(existing)
- i = i + 1 # look at the entry after qn
- while (i < num_existing) and (existing[i][:pflen] == prefixed):
- child_loggers.append(existing[i])
- i = i + 1
+ while i < num_existing:
+ if existing[i][:pflen] == prefixed:
+ child_loggers.append(existing[i])
+ i += 1
existing.remove(qn)
if "level" in section:
level = section["level"]