(original) (raw)
changeset: 81532:8eac88f49cc0 branch: 3.2 parent: 81527:411bb75be5d1 user: Vinay Sajip <vinay_sajip@yahoo.co.uk> date: Tue Jan 15 17:55:57 2013 +0000 files: Lib/logging/__init__.py description: Issue #9501: Improved shutdown handling to deal with module attributes correctly. diff -r 411bb75be5d1 -r 8eac88f49cc0 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Tue Jan 15 17:56:08 2013 +0200 +++ b/Lib/logging/__init__.py Tue Jan 15 17:55:57 2013 +0000 @@ -711,7 +711,8 @@ # 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: </vinay_sajip@yahoo.co.uk>