summaryrefslogtreecommitdiffstats
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/config.py')
-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 2881e3f..eb2c248 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) + 1 # start with the entry after qn
+ i = existing.index(qn)
prefixed = qn + "."
pflen = len(prefixed)
num_existing = len(existing)
- while i < num_existing:
- if existing[i][:pflen] == prefixed:
- child_loggers.append(existing[i])
- i += 1
+ 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
existing.remove(qn)
if "level" in opts:
level = cp.get(sectname, "level")