Ignore exceptions which occur when closing files in shutdown()
This commit is contained in:
parent
f9fd0d7988
commit
e12f71586a
|
@ -1256,8 +1256,13 @@ def shutdown():
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue