Commit f4d0af46 authored by Vinay Sajip's avatar Vinay Sajip

Issue #11444: Lock handlers while flushing/closing during shutdown.

parent 8dd2a40b
......@@ -1513,12 +1513,15 @@ def shutdown(handlerList=_handlerList):
#errors might occur, for example, if files are locked
#we just ignore them if raiseExceptions is not set
try:
h.acquire()
h.flush()
h.close()
except:
if raiseExceptions:
raise
#else, swallow
finally:
h.release()
#Let's try and shutdown automatically on application exit...
try:
......
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