diff options
Diffstat (limited to 'Lib/logging')
| -rw-r--r-- | Lib/logging/__init__.py | 3 | ||||
| -rw-r--r-- | Lib/logging/config.py | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index a3b3e39..b48bee8 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1513,15 +1513,12 @@ def shutdown(handlerList=_handlerList): #errors might occur, for example, if files are locked #we just ignore them if raiseExceptions is not set try: - h.acquire() h.flush() h.close() except: if raiseExceptions: raise #else, swallow - finally: - h.release() #Let's try and shutdown automatically on application exit... try: 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") |
