Ignore exceptions which occur when closing files in shutdown()
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index e9bcf33..8c63160 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1256,8 +1256,13 @@
Should be called at application exit.
"""
for h in _handlers.keys():
- h.flush()
- h.close()
+ #errors might occur, for example, if files are locked
+ #we just ignore them
+ try:
+ h.flush()
+ h.close()
+ except:
+ pass
#Let's try and shutdown automatically on application exit...
try: