[Python-checkins] python/dist/src/Lib/logging __init__.py, 1.17, 1.18

vsajip at users.sourceforge.net vsajip at users.sourceforge.net
Thu Jul 29 11:19:32 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/logging
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32277

Modified Files:
	__init__.py 
Log Message:
Ignore exceptions which occur when closing files in shutdown()

Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/logging/__init__.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** __init__.py	8 Jul 2004 10:22:35 -0000	1.17
--- __init__.py	29 Jul 2004 09:19:30 -0000	1.18
***************
*** 1257,1262 ****
      """
      for h in _handlers.keys():
!         h.flush()
!         h.close()
  
  #Let's try and shutdown automatically on application exit...
--- 1257,1267 ----
      """
      for h in _handlers.keys():
!         #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...



More information about the Python-checkins mailing list