summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-08 22:47:18 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-03-08 22:47:18 (GMT)
commitee145ecc5fdcbb23152407fc76dac8f6aa886c3f (patch)
treeef58cc50d0ea1e505cb79aafe28deddee589e289
parent9e1ed47e91ceadc961ae58e2179b324f085d54e5 (diff)
parentf4d0af460a279859b75c11500f14d14a1b29ee79 (diff)
downloadcpython-ee145ecc5fdcbb23152407fc76dac8f6aa886c3f.zip
cpython-ee145ecc5fdcbb23152407fc76dac8f6aa886c3f.tar.gz
cpython-ee145ecc5fdcbb23152407fc76dac8f6aa886c3f.tar.bz2
Issue #11444: Merge fix from 2.6.
-rw-r--r--Lib/logging/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 2f081a0..aaad898 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1627,6 +1627,7 @@ def shutdown(handlerList=_handlerList):
h = wr()
if h:
try:
+ h.acquire()
h.flush()
h.close()
except (IOError, ValueError):
@@ -1635,6 +1636,8 @@ def shutdown(handlerList=_handlerList):
# references to them are still around at
# application exit.
pass
+ finally:
+ h.release()
except:
if raiseExceptions:
raise