summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 17:49:33 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-07 17:49:33 (GMT)
commit3f84b07816fc63dd4996146bdd757f6bc81c54a9 (patch)
tree2f28c6e2c86bc0c82ad9884b771d37c0b5da643c /Lib/logging
parentd86e4c86733736f938100bae85b6eb3fadf5f02c (diff)
downloadcpython-3f84b07816fc63dd4996146bdd757f6bc81c54a9.zip
cpython-3f84b07816fc63dd4996146bdd757f6bc81c54a9.tar.gz
cpython-3f84b07816fc63dd4996146bdd757f6bc81c54a9.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 4703a0a..25f34ec 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -226,14 +226,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")