diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 18:02:57 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 18:02:57 (GMT) |
commit | 9f9991c2f565cc9494a7bac163f1e2c34afffc09 (patch) | |
tree | e99429ac0a63d7907fb67f6b6a851d0b1e39f76a /Lib/logging | |
parent | e783553daaf27d05388d0190ffbf4d0d0a221fba (diff) | |
download | cpython-9f9991c2f565cc9494a7bac163f1e2c34afffc09.zip cpython-9f9991c2f565cc9494a7bac163f1e2c34afffc09.tar.gz cpython-9f9991c2f565cc9494a7bac163f1e2c34afffc09.tar.bz2 |
#Issue 11424: added equivalent fixes for dictConfig.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/config.py | 11 |
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]) |