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.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 52797ce..c7359ca 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -596,15 +596,14 @@ class DictConfigurator(BaseConfigurator):
loggers = config.get('loggers', EMPTY_DICT)
for name in loggers:
if name in existing:
- i = existing.index(name)
+ i = existing.index(name) + 1 # look after name
prefixed = name + "."
pflen = len(prefixed)
num_existing = len(existing)
- i = i + 1 # look at the entry after name
- 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(name)
try:
self.configure_logger(name, loggers[name])