summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 15:02:11 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 15:02:11 (GMT)
commit8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101 (patch)
treeff279cf724c8302b83bedf6cdea21a9b5658ced2 /Lib/logging
parentdf8e75ed5a48860afd87dee7cb7a42286703245f (diff)
downloadcpython-8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101.zip
cpython-8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101.tar.gz
cpython-8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101.tar.bz2
Issue #11424: Fix bug in determining child loggers.
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 eb2c248..2881e3f 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -232,14 +232,14 @@ def _install_loggers(cp, handlers, disable_existing_loggers):
propagate = 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 opts:
level = cp.get(sectname, "level")