Commit bfff499e authored by Vinay Sajip's avatar Vinay Sajip

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

parent fc7e40d6
...@@ -711,7 +711,8 @@ def _removeHandlerRef(wr): ...@@ -711,7 +711,8 @@ def _removeHandlerRef(wr):
# This function can be called during module teardown, when globals are # 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 # set to None. If _acquireLock is None, assume this is the case and do
# nothing. # nothing.
if _acquireLock is not None: if (_acquireLock is not None and _handlerList is not None and
_releaseLock is not None):
_acquireLock() _acquireLock()
try: try:
if wr in _handlerList: if wr in _handlerList:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment