diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-01-15 17:56:43 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-01-15 17:56:43 (GMT) |
commit | 6e669fba477e1f6c26f8eaf3c7efcf0613e65c7f (patch) | |
tree | 985a98f0ddda7781040ed3d5653812f3a5d2e101 /Lib/logging | |
parent | 1e2b7ee3e8b7040228e05c7ed38937bf6390c9b7 (diff) | |
parent | 5e1c3ce13366ec72b5e9b67d5681266ad93c0ee1 (diff) | |
download | cpython-6e669fba477e1f6c26f8eaf3c7efcf0613e65c7f.zip cpython-6e669fba477e1f6c26f8eaf3c7efcf0613e65c7f.tar.gz cpython-6e669fba477e1f6c26f8eaf3c7efcf0613e65c7f.tar.bz2 |
Issue #9501: Merged fix from 3.2.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 591f45b..fa03f78 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -708,7 +708,8 @@ def _removeHandlerRef(wr): # 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): _acquireLock() try: if wr in _handlerList: |