1. mirror
  2. cpython


Vinay Sajip  committed 8eac88f

Issue #9501: Improved shutdown handling to deal with module attributes correctly.

  • Participants
  • Parent commits 411bb75
  • Branches 3.2

Comments (0)

Files changed (1)

File Lib/logging/__init__.py

View file
     # This function can be called during module teardown, when globals are
     # set to None. If _acquireLock is None, assume this is the case and do
     # nothing.
-    if _acquireLock is not None:
+    if (_acquireLock is not None and _handlerList is not None and
+        _releaseLock is not None):
             if wr in _handlerList: