diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 15:07:58 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 15:07:58 (GMT) |
commit | 44b740ff2850fbd710c98dd7035a606c5293e4d2 (patch) | |
tree | fad39f2c03a125fed7e05483166c062c42e6fbd1 /Lib/logging | |
parent | bf12cdc24a5d75c6938696fb55fd2ed4bf1ca08b (diff) | |
parent | 8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101 (diff) | |
download | cpython-44b740ff2850fbd710c98dd7035a606c5293e4d2.zip cpython-44b740ff2850fbd710c98dd7035a606c5293e4d2.tar.gz cpython-44b740ff2850fbd710c98dd7035a606c5293e4d2.tar.bz2 |
#Issue 11424: merged fix from 2.6.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 8e4fa80..5af91d4 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") |