Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b51aa7b

Browse files
committed
Issue #9501: Merged fix from 3.3.
2 parents fb3c628 + 6e669fb commit b51aa7b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/logging/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,8 @@ def _removeHandlerRef(wr):
708708
# This function can be called during module teardown, when globals are
709709
# set to None. If _acquireLock is None, assume this is the case and do
710710
# nothing.
711-
if _acquireLock is not None:
711+
if (_acquireLock is not None and _handlerList is not None and
712+
_releaseLock is not None):
712713
_acquireLock()
713714
try:
714715
if wr in _handlerList:

0 commit comments

Comments
 (0)