Commit e12f7158 authored by Vinay Sajip's avatar Vinay Sajip

Ignore exceptions which occur when closing files in shutdown()

parent f9fd0d79
...@@ -1256,8 +1256,13 @@ def shutdown(): ...@@ -1256,8 +1256,13 @@ def shutdown():
Should be called at application exit. Should be called at application exit.
""" """
for h in _handlers.keys(): for h in _handlers.keys():
h.flush() #errors might occur, for example, if files are locked
h.close() #we just ignore them
try:
h.flush()
h.close()
except:
pass
#Let's try and shutdown automatically on application exit... #Let's try and shutdown automatically on application exit...
try: 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